ID: 36880
User updated by: jbond007 at atsat dot com
Reported By: jbond007 at atsat dot com
-Status: Feedback
+Status: Open
Bug Type: OCI8 related
Operating System: Linux RH4
PHP Version: 5.1.2
New Comment:
Seems such problems don't happen only in ocilogon,
here are 2 backtraces I generated from gdb as I didn't
get any core:
Backtrace calling OCIlogon:
(gdb) bt
#0 0x01bc92e8 in lxhcsn ()
from
/oraclebase/u01/app/oracle/product/10.2.0/lib/libclntsh.so.10.1
#1 0x0146bcd2 in kpcsnevget ()
from
/oraclebase/u01/app/oracle/product/10.2.0/lib/libclntsh.so.10.1
#2 0x013f12ba in OCINlsEnvironmentVariableGet ()
from
/oraclebase/u01/app/oracle/product/10.2.0/lib/libclntsh.so.10.1
#3 0x00e9fed2 in php_oci_do_connect_ex (username=0x952e77c
"boutique",
username_len=8, password=0x952e854 "xxxxxx99", password_len=8,
new_password=0x0, new_password_len=0,
dbname=0x955650c " (DESCRIPTION =\n (ADDRESS_LIST =\n
(ADDRESS = (PROTOCOL = TCP)(HOST = 128.128.2.1)(PORT = 1521))\n )\n
(CONNECT_DATA =\n (SID = OSID1)\n (SERVER = DEDICATED)\n
)\n )", dbname_len=186,
charset=0x0, session_mode=0, persistent=0, exclusive=1)
at /root/php5.1-200603280830/ext/oci8/oci8.c:993
#4 0x00ea0394 in php_oci_do_connect (ht=3, return_value=0x925ac2c,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1,
persistent=0,
exclusive=1) at /root/php5.1-200603280830/ext/oci8/oci8.c:940
#5 0x00ea908e in zif_oci_new_connect (ht=3, return_value=0x925ac2c,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /root/php5.1-200603280830/ext/oci8/oci8_interface.c:1520
#6 0x0101ffb5 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff9d5c0)
at zend_vm_execute.h:200
#7 0x0101f921 in execute (op_array=0x9262bb0) at zend_vm_execute.h:92
---Type <return> to continue, or q <return> to quit---Quit
(gdb) bt
#0 0x01bc92e8 in lxhcsn ()
from
/oraclebase/u01/app/oracle/product/10.2.0/lib/libclntsh.so.10.1
#1 0x0146bcd2 in kpcsnevget ()
from
/oraclebase/u01/app/oracle/product/10.2.0/lib/libclntsh.so.10.1
#2 0x013f12ba in OCINlsEnvironmentVariableGet ()
from
/oraclebase/u01/app/oracle/product/10.2.0/lib/libclntsh.so.10.1
#3 0x00e9fed2 in php_oci_do_connect_ex (username=0x952e77c
"boutique",
username_len=8, password=0x952e854 "taipei99", password_len=8,
new_password=0x0, new_password_len=0,
dbname=0x955650c " (DESCRIPTION =\n (ADDRESS_LIST =\n
(ADDRESS = (PROTOCOL = TCP)(HOST = 128.128.2.1)(PORT = 1521))\n )\n
(CONNECT_DATA =\n (SID = OSID1)\n (SERVER = DEDICATED)\n
)\n )", dbname_len=186,
charset=0x0, session_mode=0, persistent=0, exclusive=1)
at /root/php5.1-200603280830/ext/oci8/oci8.c:993
#4 0x00ea0394 in php_oci_do_connect (ht=3, return_value=0x925ac2c,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1,
persistent=0,
exclusive=1) at /root/php5.1-200603280830/ext/oci8/oci8.c:940
#5 0x00ea908e in zif_oci_new_connect (ht=3, return_value=0x925ac2c,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /root/php5.1-200603280830/ext/oci8/oci8_interface.c:1520
#6 0x0101ffb5 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff9d5c0)
at zend_vm_execute.h:200
#7 0x0101f921 in execute (op_array=0x9262bb0) at zend_vm_execute.h:92
---Type <return> to continue, or q <return> to quit---
#8 0x0101fb75 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbff9e580)
at zend_vm_execute.h:234
#9 0x0101f921 in execute (op_array=0x94a8f74) at zend_vm_execute.h:92
#10 0x010058fe in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at /root/php5.1-200603280830/Zend/zend.c:1109
#11 0x00fccebc in php_execute_script (primary_file=0xbffa08d0)
at /root/php5.1-200603280830/main/main.c:1726
#12 0x0108b4a3 in php_handler (r=0x923bd18)
at
/root/php5.1-200603280830/sapi/apache2handler/sapi_apache2.c:586
#13 0x0807172e in ap_run_handler (r=0x923bd18) at config.c:157
#14 0x08071af9 in ap_invoke_handler (r=0x923bd18) at config.c:371
#15 0x08085a89 in ap_process_request (r=0x923bd18) at
http_request.c:258
#16 0x08083761 in ap_process_http_connection (c=0x9224800) at
http_core.c:171
#17 0x08076da6 in ap_run_process_connection (c=0x9224800) at
connection.c:43
#18 0x08096177 in child_main (child_num_arg=0) at prefork.c:640
#19 0x08096340 in make_child (s=0x2, slot=0) at prefork.c:680
#20 0x08096893 in ap_mpm_run (_pconf=0xbffa0c40, plog=0x90db198,
s=0xbffa0c44)
at prefork.c:956
#21 0x08061d4c in main (argc=2, argv=0xbffa0df4) at main.c:712
Backtrace without OCILogon:
[Switching to Thread -1208052032 (LWP 8008)]
0x00a067a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
(gdb) bt
#0 0x00a067a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x00addfcb in writev () from /lib/tls/libc.so.6
#2 0x0015e608 in apr_socket_sendv (sock=0x865a668, vec=0xbfef2ad0,
nvec=1,
len=0xbfef0988) at network_io/unix/sendrecv.c:201
#3 0x0807034a in writev_it_all (s=0x865a668, vec=0xbfef2ad0, nvec=1,
len=196,
nbytes=0xbfef0a08) at core_filters.c:321
#4 0x08070e06 in ap_core_output_filter (f=0x865acb0, b=0x868c110)
at core_filters.c:868
#5 0x080859b9 in ap_process_request (r=0x865e9d0) at
http_request.c:231
#6 0x08083761 in ap_process_http_connection (c=0x865a800) at
http_core.c:171
#7 0x08076da6 in ap_run_process_connection (c=0x865a800) at
connection.c:43
#8 0x08096177 in child_main (child_num_arg=-32) at prefork.c:640
#9 0x08096340 in make_child (s=0x2, slot=0) at prefork.c:680
#10 0x08096893 in ap_mpm_run (_pconf=0xbfef2d70, plog=0x8511198,
s=0xbfef2d74)
at prefork.c:956
#11 0x08061d4c in main (argc=2, argv=0xbfef2f24) at main.c:712
Many thanks
Previous Comments:
------------------------------------------------------------------------
[2006-03-28 12:27:10] [EMAIL PROTECTED]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Definitely not reproducible here.
------------------------------------------------------------------------
[2006-03-28 12:11:52] jbond007 at atsat dot com
I get the same behaviour with the version 5.1.3RC
Then, in Ocilogon($user,$pass,$db),
using the complete string found in tnsnames.ora,
instead of the short name, makes it work randomly
but not often. Then, sometimes instead of a segmentation
fault, I get : OCIEnvNlsCreate() failed. There is something wrong with
your system - please check that ORACLE_HOME is set and points to the
right directory in /usr/local/web/sfmi/include/oraconnect.php on line
38
And if I use Ocilogon($user,$pass,$db,$charset), with
$charset='WE8DEC', I always get a segmentation fault.
A check of getenv('ORACLE_HOME') before calling
ocilogon, shows $ORACLE_HOME env var is correct.
------------------------------------------------------------------------
[2006-03-28 00:06:16] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
------------------------------------------------------------------------
[2006-03-28 00:05:53] jbond007 at atsat dot com
Description:
------------
I installed php 5.1.2 working with Apache 2.2
(the problem occurs with Apache 1.X.Y too and with
php4.X too).
When I ask <?phpinfo()?> everything appears correctly,
ORACLE_HOME, LD_LIBRARY_PATH and other env vars
are correct.
But OciLogon crashes apache with a segmentation Fault,
each time I use it.
If I use Ocilogon with php in cgi mode, it works fine,
and I could connect to my database, but not with apache.
Reproduce code:
---------------
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs --with-openssl --with-bz2
--with-mysql=/usr/local/mysql --enable-ftp
--with-oci8=/oraclebase/u01/app/oracle/product/10.2.0 --enable-bcmath
--enable-calendar --enable-sigchild
--with-pdo-oci=/oraclebase/u01/app/oracle/product/10.2.0
The script to start apache is:
ORACLE_BASE=/oraclebase/u01/app/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH
/usr/local/apache/bin/apachectl start
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36880&edit=1