php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44416 OCIStmtExecute: ORA-03135: connection lost contact
Submitted: 2008-03-12 11:18 UTC Modified: 2008-03-12 17:18 UTC
From: hhadjali at cdcsoftware dot com Assigned:
Status: Closed Package: OCI8 related
PHP Version: 4.4.8 OS: AIX 5.3
Private report: No CVE-ID: None
 [2008-03-12 11:18 UTC] hhadjali at cdcsoftware dot com
Description:
------------
Hi;

We are running on :

apache: 1.3.34
php   : 4.4.2
Oracle: 10.2.0


Our Web based application seems to have a problem intermittently where by php looses connection to Oracle. We get the following error:

login ::   ::  Mar, 12th 10:28:54 ::: Warning: ociexecute(): OCIStmtExecute: ORA
login ::   ::  Mar, 12th 10:28:54 ::: -03135: connection lost contact

in file /
login ::   ::  Mar, 12th 10:28:54 ::: CatalystWMS/wmsbase/web/dbaccess/adodb-oci
login ::   ::  Mar, 12th 10:28:54 ::: 8.inc.php on line 876
--------------------------------------------------------------------------------
login ::   ::  Mar, 12th 10:28:54 ::: Notice: Only variable references should be
login ::   ::  Mar, 12th 10:28:54 :::  returned by reference
in file /CatalystWM
login ::   ::  Mar, 12th 10:28:54 ::: S/wmsbase/web/dbaccess/adodb.inc.php on li
login ::   ::  Mar, 12th 10:28:54 ::: ne 867
--------------------------------------------------------------------------------
login ::   ::  Mar, 12th 10:28:54 ::: Warning: ociexecute(): OCIStmtExecute: ORA
login ::   ::  Mar, 12th 10:28:54 ::: -03114: not connected to ORACLE

in file /
login ::   ::  Mar, 12th 10:28:54 ::: CatalystWMS/wmsbase/web/dbaccess/adodb-oci
login ::   ::  Mar, 12th 10:28:54 ::: 8.inc.php on line 876
--------------------------------------------------------------------------------
login ::   ::  Mar, 12th 10:28:54 ::: Notice: Only variable references should be
login ::   ::  Mar, 12th 10:28:54 :::  returned by reference
in file /CatalystWM
login ::   ::  Mar, 12th 10:28:54 ::: S/wmsbase/web/dbaccess/adodb.inc.php on li
login ::   ::  Mar, 12th 10:28:54 ::: ne 867
--------------------------------------------------------------------------------

The only solution is to restart Apache. Why Apache restart solves the connection problem for a long period?

Also, I've prepared a php script that queries the Oracle Database. This seems to work eventhough the problem exist and before we restart Apache.

The script is:

<?php

$conn = OCILogon("username","password", "tnsname");

$stmt = OCIParse($conn,"select emp_id from employee order by emp_id");

#OCIBindByName($stmt, ':emp', $emp);

$ok = OCIExecute($stmt);

while (OCIFetchInto($stmt,$arr)) {
#        print_r($arr);
        echo "EMP_ID = $arr[0]";
        echo "<hr>";
}

?>

Why the query using the above script works and when the application uses the adodb-oci library we get the "connection lost contact" problem. Is there a bug in the persistent connection or what?


Any advise will be appreciated.

Thanks
Hicham


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-12 11:22 UTC] hhadjali at cdcsoftware dot com
The problem is happening every day, not intermittently.

Thanks
 [2008-03-12 12:30 UTC] hhadjali at cdcsoftware dot com
Changed the title of the bug
 [2008-03-12 17:18 UTC] sixd@php.net
We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6
ready.

+----------------------------------------
|
| PHP 4 only ships an original version of OCI8 that is notorious for
| connection problems like the ones you describe.  In 2005, the OCI8
| code was refactored, enhanced, and released in PHP 5, where it has
| been maintained.  For PHP 4 it is recommended to download the
| equivalent, latest stable OCI8 from PECL.
|
+----------------------------------------

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC