ID: 22857 User updated by: dean at vipersoft dot co dot uk Reported By: dean at vipersoft dot co dot uk Status: Closed Bug Type: OCI8 related Operating System: Linux 2.4 PHP Version: 4.3.1 New Comment:
Ok - I am happy to mark this as closed, but if anyone else has the same/similar problem, maybe my comment on the CLI version (and not building it separately), might help. Dean Previous Comments: ------------------------------------------------------------------------ [2003-03-31 02:14:10] [EMAIL PROTECTED] No idea, but you don't need to compile CLI separately anyway. But it works, so.. ------------------------------------------------------------------------ [2003-03-31 02:04:11] dean at vipersoft dot co dot uk Sorry for the lack of feedback - I was busy scratching my head! :) The fix was a strange one. I used to compile PHP with apache, then re-compile it for the CLI version. To fix the problem, I just compiled PHP with apache, and did NOT build the CLI version. Would that help explain why I have had *no* hangs since then? Thanks Dean ------------------------------------------------------------------------ [2003-03-31 02:00:05] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2003-03-24 18:03:55] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip First of all, those putenv()'s are useless, you need to set them in the environment before starting Apache / running CLI. It might help if you tried debugging this with gdb. # gdb /opt/php/bin/php (gdb) run yourtest.php And do that as many times as required to get it fail.. ------------------------------------------------------------------------ [2003-03-24 14:06:01] dean at vipersoft dot co dot uk Using the sample code below to submit a number of queries to an Oracle database - about every 1 in 10 executions causes the OCIExecute function to simple "hang" for about 10 minutes before timing out. If more information is needed or any sorts of debugging is required, I will follow up to this bug with the requested information. Thanks Dean #!/opt/php/bin/php -q <? $webDbase = "blah"; $webUser = "blah"; $webPassword = "blah"; global $ORACLE_HOME; $ORACLE_HOME = "/opt/oracle/OraHome81"; PutEnv("ORACLE_SID=".$webDbase); PutEnv("LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:$ORACLE_HOME/jdbc/lib"); PutEnv("ORACLE_HOME=".$ORACLE_HOME); $conn = ocilogon($webUser, $webPassword, $webDbase) or die ("Could not connect (Bad background connect Userid or Password) [".Getenv("ORACLE_SID")."]"); // Loop around 4000 times - basically to throw a lot // of queries at the database for ($i=1;$i<=4000;$i++) { echo "Iteration ".$i."\n"; // use a random number to use differing queries $strSQL = "SELECT * FROM blah WHERE id = '".rand(0,50000)."'"; $qid = OCIparse($conn, $strSQL); echo "before execute\n"; OCIexecute($qid); echo "after execute\n"; } echo "Done"; ?> sample output from above when "hung" . . . Iteration 2671 before execute after execute Iteration 2672 before execute after execute Iteration 2673 before execute <then nothing> Notes: * Doesn't happen every time * Happens about 1 in every 10 runs of the above code * Happens from both the CLI php and through Apache * Eventually times out without finishing off its iteration ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22857&edit=1