ID: 30412 Comment by: pumuckel at metropolis dot de Reported By: subscription at nazarenko dot net Status: No Feedback Bug Type: OCI8 related Operating System: SuSE Linux 8.2 PHP Version: 5.0.4-Dev New Comment:
The segfaults are reproducable on our machine with only a ocilogon(...) call. The segfaults occur ONLY, if the connection gets destroyed by the automatic variable clean up process after executing the script. When unset($conn) is called before, everything works fine. Previous Comments: ------------------------------------------------------------------------ [2005-02-16 04:44:34] subscription at nazarenko dot net TNS_ADMIN is not used, since I do not utilize tnsnames.ora file. As you can see from the code example I use the connection description string directly in the script: <?php $db_conn = ocilogon( "user", "password", "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myoracle)(PORT= 1521)))(CONNECT_DATA=(SERVICE_NAME=CRPT)))"); ?> ORACLE_HOME is definitely set, otherwise there will be no successful queries at all. ------------------------------------------------------------------------ [2005-02-10 21:34:05] [EMAIL PROTECTED] Please check that you have set all environments variables (i.e. ORACLE_HOME, TNS_ADMIN etc) properly. ------------------------------------------------------------------------ [2005-02-10 21:17:23] subscription at nazarenko dot net Hello it is me again, Tested both 5.0.3 release and the latest snapshot php5-STABLE-200502101130 with both Apache 2.0.52 Prefork and Worker MPMs. 5.0.3 and the snapshot behave identically. Under Prefork MPM everything is 100% ok. Under Worker the same problem as before: some page loads are unsuccessful with no segfault. The browser just keeps waiting and waiting and nothing happens. This happens on average for 30% of page requests containing Oracle queries. Don't know if you want to pursue this further as the Prefork works fine now. Many thanks for your time and effort!! ------------------------------------------------------------------------ [2005-01-13 01:27:24] [EMAIL PROTECTED] Please, try latest snapshot with non-threaded Apache. Are you still able to replicate the problem ? ------------------------------------------------------------------------ [2004-12-02 15:17:32] subscription at nazarenko dot net Let me confirm it again after some more testing today that I still do get segfaults, but not that often than before. Also, let me point out that it seems to be exclusively Apache/PHP problem. The same script is run from the shell environment with no problems at all. Now to the example that you have asked for. It is really simple. In fact *any* Oracle query will cause occasional browser "hanging". Here is a bit of code I used today for testing: <?php $db_conn = ocilogon( "user", "password", "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myoracle)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=CRPT)))") or die("Critical Error: No connection to Oracle!"); $cmdstr = " SELECT DISTINCT TRIM(XM.X_MEMBER_ID) MEMBER_ID, S.X_MEMBER_ID DBS_ID FROM TABLE_SITE_PART SP, TABLE_SITE_PART SP2, TABLE_X_MEMBERDATA XM, TABLE_SITE S WHERE SP2.X_CLASS_KEY = 9 AND SP2.LEVEL_TO_BIN IN (0,1,2,3,4,5) AND SP2.SITE_PART2SITE_PART = SP.OBJID AND SP2.X_SITE_PART2MEMBERDATA = XM.OBJID AND SP.ALL_SITE_PART2SITE = S.OBJID AND XM.X_STATUS = 'Active' AND S.STATUS = '0' ORDER BY TRIM(XM.X_MEMBER_ID) "; $parsed = ociparse($db_conn, $cmdstr); ociexecute($parsed); $boxrows = ocifetchstatement($parsed, $listbox); OCIFreeStatement($parsed); print_r($listbox); ?> Most of the times this would work fine returning me an array of data. But sometimes the browser would just wait with nothing happening. And very rarely the page would fail immediately (producing a segfault in apache's error log) Hope this helps. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/30412 -- Edit this bug report at http://bugs.php.net/?id=30412&edit=1