Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Oracle -- ocidriver conn_id is boolean
#1

[eluser]regal2157[/eluser]
Hey guys,

Just trying to do a SIMPLE connection, and query. But when I run the query, I get a few errors because $conn_id is a boolean, and not a resource. I'll list the errors shown first, then my settings. I have tried something from the Oracle Known Issues which isn't related to my problem, and of course - no dice.

ERRORS:
Quote:A PHP Error was encountered

Severity: Warning

Message: ociparse() expects parameter 1 to be resource, boolean given

Filename: oci8/oci8_driver.php

Line Number: 186
A PHP Error was encountered

Severity: Warning

Message: ocisetprefetch() expects parameter 1 to be resource, null given

Filename: oci8/oci8_driver.php

Line Number: 171
A PHP Error was encountered

Severity: Warning

Message: ocifetchinto() expects parameter 1 to be resource, null given

Filename: oci8/oci8_result.php

Line Number: 155

A PHP Error was encountered

Severity: Warning

Message: ocifetchinto() expects parameter 1 to be resource, null given

Filename: oci8/oci8_result.php

Line Number: 155

A var dump of the query variable returns this: object(CI_DB_oci8_result)#15 (11) { ["stmt_id"]=> NULL ["curs_id"]=> NULL ["limit_used"]=> NULL ["conn_id"]=> bool(false) ["result_id"]=> NULL ["result_array"]=> array(0) { } ["result_object"]=> array(0) { } ["custom_result_object"]=> array(0) { } ["current_row"]=> int(0) ["num_rows"]=> int(0) ["row_data"]=> NULL }. Not sure if that would help.

My settings:
database.php
Code:
$db['abc']['hostname'] = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=sid)))';
$db['abc']['username'] = 'user';
$db['abc']['password'] = 'pass';
$db['abc']['database'] = '';
$db['abc']['dbdriver'] = 'oci8';

controller (It's just temp here.. will eventually be moved to a respective model)
Code:
public function test()
{
    $this->load->database();
    $q = $this->db->query("SELECT FIELD FROM TABLE");
    var_dump($q);
    foreach($q->result() as $row)
    {
        echo $row->FIELD;
    }
}


Messages In This Thread
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 06-22-2011, 03:45 PM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 06-22-2011, 04:23 PM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 06-24-2011, 09:40 AM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 07-26-2011, 02:32 PM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 07-26-2011, 03:28 PM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 07-26-2011, 04:47 PM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 07-26-2011, 04:58 PM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 07-27-2011, 10:52 AM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 07-27-2011, 11:04 AM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 07-27-2011, 04:33 PM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 07-27-2011, 04:51 PM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 07-27-2011, 05:02 PM
[SOLVED] Oracle -- ocidriver conn_id is boolean - by El Forum - 11-06-2013, 01:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB