ID: 8546
Updated by: thies
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: OCI8 related
Assigned To: 
Comments:

if user/pw/dbname are the same the oci driver reuses the 
*same* connections and you only get one transaction 
context. to isolate the sessions please use ocinlogon for 
either $local or $remote (or both;-)



Previous Comments:
---------------------------------------------------------------------------

[2001-01-04 06:38:51] [EMAIL PROTECTED]
The html produced by the code below :

Result : TAB1,12:11:47

Warning: OCIFetchInto: ORA-01001: invalid cursor in C:wwwphptest.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);
  }


---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8546&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to