php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37531 Persistent connection corruption
Submitted: 2006-05-19 22:29 UTC Modified: 2006-08-22 19:45 UTC
From: jreed at myers dot com Assigned: tony2001 (profile)
Status: Closed Package: OCI8 related
PHP Version: 5.1.4 OS: Linux - 386
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jreed at myers dot com
New email:
PHP Version: OS:

 

 [2006-05-19 22:29 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-22 19:37 UTC] jreed at myers dot com
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
 [2006-05-29 11:00 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2006-08-22 19:39 UTC] jreed at myers dot com
This fix did not make it into the latest 5.1.5 release.  I do not see any CVS snaps for the 5.1.x series, only for Beta 5.2.x.  Does this mean this fix will not be released until v5.2?
 [2006-08-22 19:45 UTC] tony2001@php.net
Yes, 5_1 branch is only for security fixes.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC