ID: 24003 Comment by: e_zagrai at yahoo dot com Reported By: dkruger at stevens-tech dot edu Status: Feedback Bug Type: OCI8 related Operating System: Redhat 8.0 PHP Version: 4.3.2 New Comment:
I've got exectly the same problem and I tryed to use the CVS snapshot you proposed, but the result is the same as it was before: I execute my programm with Oracle interaction for 2-3 times and then I get the error "Document contains no data" every time I try to connect to Oracle in my programm. If I execute any other php without Oracle interaction - it works. Apache's error log contains the line: [Wed Jun 04 09:16:40 2003] [notice] child pid 3340 exit signal Segmentation fault (11) Thanks, Elena Previous Comments: ------------------------------------------------------------------------ [2003-06-03 22:14:59] [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 ------------------------------------------------------------------------ [2003-06-03 17:16:07] dkruger at stevens-tech dot edu The following code used to work on Oracle 8.0 on Solaris. Now, under Redhat 8.0 and Oracle 9i, when you run it several times in a row, it eventually seg faults and the only way to re-establish the connection is by restarting apache. Our PHP is built with ./configure --prefix=usr/local/php --with-gd=/usr/local --with-png-dir=/usr/local --with-oci8=/oracle --with-apx2=/usr/local/apache/bin/apxs --with-jpeg-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --enable-debug --enable-sigchild This is not my code, and I do not use PHP, so I want to know first if there is a better way of writing this code. Can it successfully recover given that it dies for some reason on a query? Is there any more recoverable way of writing it? Even if it's not optimal code, it should be slightly more recoverable than this. print "Test"; putenv("ORACLE_SID=coastal"); putenv("ORACLE_HOME=/oracle"); putenv("TNS_ADMIN=/oracle/network/admin/tnsnames.ora"); $connection = OCILogon("user","xxx", "mydb") or die("Couldn't logon."); $sql = "select count(*) from x"; $sql_statement = OCIParse($connection,$sql) or die("Couldn't parse statement."); OCIExecute($sql_statement, OCI_DEFAULT) or die("Couldn't execute statement."); $num_columns = OCINumCols($sql_statement); OCIFreeStatement($sql_statement); OCILogoff($connection); PHP still runs after this code, as long as the page does not involve any other Oracle interaction. thanks! Dov ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24003&edit=1