ID: 26393 Updated by: [EMAIL PROTECTED] Reported By: troy dot tinnes at motorola dot com -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: Solaris 2.8 PHP Version: 4.3.4 New Comment:
Did you try the patch or not? Previous Comments: ------------------------------------------------------------------------ [2003-11-25 14:59:08] troy dot tinnes at motorola dot com I assume the resolution in this case is to switch to persistent connections? Here's why I'm hesitant to use persistent connections with my application: 1) the application is not transaction based, its simple inquiry/lookup. A person would do potentially 2-3 quick look-ups per day. The persistent connection would potentially cost more than the connect/tear-down cost for 1 user to access the system for a few minutes. 2) depending on the request, I sometimes have data from 2 or 3 different database instances represented on one web page output. ie. 1 database has a ISO country code HK entered to indicate the currency code - the master currencies are located in a data warehouse elsewhere. Establishing persistent connections for each user for all 3 databases may be a bit excessive? ------------------------------------------------------------------------ [2003-11-25 14:18:22] [EMAIL PROTECTED] Oops..I meant the Open reports.. :) See bug #24531 which has some patch in it. Try the patch.. ------------------------------------------------------------------------ [2003-11-25 09:02:28] troy dot tinnes at motorola dot com I went through all 1300 of them. The few that looked similar ended up with no answer. ie. You asked them to do a backtrace and there was no response. ------------------------------------------------------------------------ [2003-11-25 03:09:32] [EMAIL PROTECTED] Please check the other OCI8 related bug reports, I'm not sure but most likely one or two of them are reporting this exact same problem. ------------------------------------------------------------------------ [2003-11-24 23:19:56] troy dot tinnes at motorola dot com Description: ------------ Environment: Sun Solaris 2.8 Sun Ultra Enterprise PHP 4.3.4 Apache 2.0.47 Problem Description: On some HTML outputs, the page code stops unexpectedly. There does not appear to be any real reason for halting the execution - it stops generating code many times - midway through displaying a record (1 HTML table row). For example if I have a query that shows which people bought widget "a" in the past month - the output might be ok. Use the same script and show which people bought widget "b" - the script might stop 3/4 of the way down the page mid-record. One thing that is consistent - is that it will always stop in the same place. 2 days later, Widget "b" output might be fine - displaying Widget "a" is now a problem. Reproduce code: --------------- I use object-oriented code to do the database activities - example: $db = new myDB ($db1); $db->connect(); $db->query($sql1); In the db.class file, I have functions like this: function connect () { $conn = ocilogon ($this->username, $this->password, $this->hostspec); $this->conn = $conn; } AND function query ($sql) { $this->stmt = @ociparse ($this->conn, $sql); if (!$this->stmt) { return false; } else { @ociexecute($this->stmt, OCI_DEFAULT); return($this->rowcount()); } } As I said before, I do not use persistent connections because I have several different database instances I connect to based on the type of information requested. Expected result: ---------------- I am hoping to see complete HTML outputs! Actual result: -------------- BACKTRACE: --------- solaris8:/opt/web/apache_php/apache2/bin# /usr/misc/bin/gdb /opt/web/apache_php/apache2/bin/httpd GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.8"... (gdb) run -X Starting program: /opt/web/apache_php/apache2/bin/httpd -X [New LWP 1] [New LWP 2] [New LWP 3] [New LWP 4] [New LWP 5] Program received signal SIGSEGV, Segmentation fault. 0xff0331f0 in strlen () from /usr/lib/libc.so.1 (gdb) bt #0 0xff0331f0 in strlen () from /usr/lib/libc.so.1 #1 0xfe1e5918 in _oci_close_session (session=0x313bc8) at /opt/web/apache_php/source/php-4.3.4/ext/oci8/oci8.c:2443 #2 0xfe1e0ca8 in _oci_session_list_dtor (rsrc=0x200e30) at /opt/web/apache_php/source/php-4.3.4/ext/oci8/oci8.c:935 #3 0xfe36dcb0 in list_entry_destructor (ptr=0x200e30) at /opt/web/apache_php/source/php-4.3.4/Zend/zend_list.c:177 #4 0xfe36aa64 in zend_hash_apply_deleter (ht=0xfe3e13fc, p=0x2017b0) at /opt/web/apache_php/source/php-4.3.4/Zend/zend_hash.c:608 #5 0xfe36ae04 in zend_hash_graceful_reverse_destroy (ht=0xfe3e13fc) at /opt/web/apache_php/source/php-4.3.4/Zend/zend_hash.c:674 #6 0xfe36dee0 in zend_destroy_rsrc_list (ht=0xfe3e13fc) at /opt/web/apache_php/source/php-4.3.4/Zend/zend_list.c:233 #7 0xfe3501dc in shutdown_executor () at /opt/web/apache_php/source/php-4.3.4/Zend/zend_execute_API.c:213 #8 0xfe3612f8 in zend_deactivate () at /opt/web/apache_php/source/php-4.3.4/Zend/zend.c:665 #9 0xfe306904 in php_request_shutdown (dummy=0x0) at /opt/web/apache_php/source/php-4.3.4/main/main.c:998 #10 0xfe383be8 in php_apache_request_dtor (r=0x187dd0) at /opt/web/apache_php/source/php-4.3.4/sapi/apache2handler/sapi_apache2.c:449 #11 0xfe3840b8 in php_handler (r=0x187dd0) ---Type <return> to continue, or q <return> to quit--- at /opt/web/apache_php/source/php-4.3.4/sapi/apache2handler/sapi_apache2.c:553 #12 0x0004a37c in ap_run_handler (r=0x187dd0) at config.c:195 #13 0x0004a950 in ap_invoke_handler (r=0x187dd0) at config.c:401 #14 0x00037d60 in ap_process_request (r=0x187dd0) at http_request.c:288 #15 0x00033274 in ap_process_http_connection (c=0x169220) at http_core.c:293 #16 0x00055740 in ap_run_process_connection (c=0x169220) at connection.c:85 #17 0x00048b78 in child_main (child_num_arg=1470896) at prefork.c:694 #18 0x00048d70 in make_child (s=0x9bb80, slot=0) at prefork.c:734 #19 0x00048dfc in startup_children (number_to_start=4) at prefork.c:806 #20 0x0004962c in ap_mpm_run (_pconf=0x1, plog=0xd1558, s=0x9bb80) at prefork.c:1022 #21 0x0004f23c in main (argc=2, argv=0xffbefd1c) at main.c:660 (gdb) LOG ENTRY IN APACHE ---------------------- websrv01:/opt/web/apache_php/apache/logs% grep Segment error_log [Thu Nov 20 20:31:59 2003] [error] [client 200.30.7.100] Segmentation Fault - core dumped [Thu Nov 20 20:33:46 2003] [error] [client 200.30.7.100] Segmentation Fault - core dumped [Thu Nov 20 20:33:55 2003] [error] [client 200.30.7.100] Segmentation Fault - core dumped [Thu Nov 20 20:47:37 2003] [error] [client 200.30.7.100] Segmentation Fault - core dumped [Sun Nov 23 19:55:45 2003] [notice] child pid 4946 exit signal Segmentation fault (11) [Sun Nov 23 19:56:04 2003] [notice] child pid 6151 exit signal Segmentation fault (11) [Sun Nov 23 19:58:31 2003] [notice] child pid 6536 exit signal Segmentation fault (11) [Sun Nov 23 20:05:13 2003] [notice] child pid 7172 exit signal Segmentation fault (11) [Mon Nov 24 13:39:02 2003] [notice] child pid 27426 exit signal Segmentation fault (11) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26393&edit=1