PHP 4.0 Bug #8546: OCIFetchInto ORA-01001 when same db and different user

From: Date: Thu, 04 Jan 2001 11:38:51 +0000
Subject: PHP 4.0 Bug #8546: OCIFetchInto ORA-01001 when same db and different user
Groups: php.dev 
Request: Send a blank email to php-dev+get-42913@lists.php.net to get a copy of this message
From: oboehm@appligos.com Operating system: Win98 PHP version: 4.0.4 PHP Bug Type: OCI8 related Bug description: OCIFetchInto ORA-01001 when same db and different user The html produced by the code below : Result : TAB1,12:11:47 Warning: OCIFetchInto: ORA-01001: invalid cursor in C:\www\php\test.php3 on line 11 ----- I got this error only when i call ocilogon with the same db param (same net8 alias). No error when : - the db param is different (different net8 alias), - same oracle database but different net8 alias name. So, replace "db" by "db2" in the second call to ocilogon and declare a new net8 alias named db2 to the same oracle database and you got no error. ----- <? $res = array(); //OCIInternalDebug(1); $local = ocilogon("user1", "pass1", "db"); $remote = ocilogon("user2","pass2", "db"); if($local && $remote) { $select1 = "select table_name from user_tables"; $select2 = "select to_char(sysdate, 'HH24:MI:SS') from dual"; $rcur = ociparse($remote, $select1); ociexecute($rcur, OCI_DEFAULT); while(ocifetchinto($rcur, &$res, OCI_ASSOC+OCI_NUM+OCI_RETURN_NULLS)) { echo "Result : " .$res[0] . ","; $lcur = ociparse($local, $select2); if($lcur) { ociexecute($lcur, OCI_DEFAULT); ocifetchinto($lcur, &$res2); ocifreecursor($lcur); echo $res2[0]; } echo "<BR>\n"; } ocifreecursor($rcur); ocilogoff($local); ocilogoff($remote); } -- Edit Bug report at: http://bugs.php.net/?id=8546&edit=1

« previous php.dev (#42913) next »