ID:               37531
 User updated by:  jreed at myers dot com
 Reported By:      jreed at myers dot com
 Status:           Open
 Bug Type:         OCI8 related
 Operating System: Linux - 386
 PHP Version:      5.1.4
 New Comment:

Error should read:

Warning: ociparse(): supplied resource is not a valid oci8 connection
resource in page2.html on line 7

Warning: ocilogoff(): supplied resource is not a valid oci8 connection
resource in page2.html on line 8


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

[2006-05-19 22:29:13] jreed at myers dot com

Description:
------------
If you open a persistent connection on one page, then on another page
you open a file using fopen, thus creating a file resource, and then
attempt to obtain a persistent oci8 connection using ociplogon(), the
returned resource is not a valid oci8 connection resource.  If you then
attempt to use that connection resource you get the following warning:

"supplied resource is not a valid oci8 connection resource"

If you close the file using fclose() prior to calling ociplogon() then
everything works fine.

This problem was introduced in v5.1.3 and continues in 5.1.4.


Reproduce code:
---------------
page1.html
<?php
putenv("TNS_ADMIN=/etc/myers");
$conn_ora = ociplogon("portal", "portal123", "eng2");
ocilogoff($conn_ora);

header("Location: page2.html");
?>

page2.html
<?php
$fp = fopen('/tmp/test.log','a');

$conn_ora = ociplogon($username, $password, $db);

$sql = "select * from dual";
$stmt = ociparse($conn_ora, $sql);
?>


Expected result:
----------------
Page redirects to second page and get a blank page.

Actual result:
--------------
Warning: ociparse(): supplied resource is not a valid oci8 connection
resource in /www/myers/sites/portal/main/orders/test2.html on line 7

Warning: ocilogoff(): supplied resource is not a valid oci8 connection
resource in /www/myers/sites/portal/main/orders/test2.html on line 8



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


-- 
Edit this bug report at http://bugs.php.net/?id=37531&edit=1

Reply via email to