From:             [EMAIL PROTECTED]
Operating system: Solaris 9
PHP version:      4.2.3
PHP Bug Type:     OCI8 related
Bug description:  Apache child segfaults when using OCILogon.

I get the following messages in my Apache 1.3.27 error log whenever I try
to use OCILogon:

[Mon Nov  4 15:32:46 2002] [notice] Apache/1.3.27 (Unix) PHP/4.2.3
configured -- resuming normal ope
rations
[Mon Nov  4 15:32:46 2002] [notice] Accept mutex: fcntl (Default: fcntl)
[Mon Nov  4 15:33:00 2002] [notice] child pid 13088 exit signal
Segmentation Fault (11)
[Mon Nov  4 15:33:00 2002] [notice] child pid 13086 exit signal
Segmentation Fault (11)
[Mon Nov  4 15:33:00 2002] [notice] child pid 13085 exit signal
Segmentation Fault (11)
[Mon Nov  4 15:33:00 2002] [notice] child pid 13084 exit signal
Segmentation Fault (11)
[Mon Nov  4 15:33:00 2002] [notice] child pid 13083 exit signal
Segmentation Fault (11)
[Mon Nov  4 15:33:00 2002] [notice] child pid 13082 exit signal
Segmentation Fault (11)
[Mon Nov  4 15:33:01 2002] [notice] child pid 13090 exit signal
Segmentation Fault (11)
[Mon Nov  4 15:33:01 2002] [notice] child pid 13089 exit signal
Segmentation Fault (11)
[Mon Nov  4 15:33:02 2002] [notice] child pid 13092 exit signal
Segmentation Fault (11)
[Mon Nov  4 15:33:02 2002] [notice] child pid 13091 exit signal
Segmentation Fault (11)

Here is the script I tested with:

<?

$SID = "(DESCRIPTION = 
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.140)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = TESTDB.WORLD)
    )
)";

$conn = OCILogon ("scott", "tiger",$SID);

print "Connected!<br>\n";
?>

Here are my configure lines:

For apache :

OPTIM="-g -m64" CFLAGS="-DDYNAMIC_MODULE_LIMIT=0" ./configure
--mandir=/usr/local/man --activate-module=src/modules/php4/libphp4.a
--enable-module=php4 --server-uid=www --server-gid=www

For PHP

CFLAGS="-g -m64" ./configure --with-apache=../apache_1.3.27 --with-xml
--with-oci8=/usr/local/oracle/OraHome --with-zlib
--enable-inline-optimization --enable-bcmath --enable-debug

They were both compiled with gcc-3.2.

Here are the environment variable settings from my httpd.conf:

SetEnv ORACLE_BASE /usr/local/oracle
SetEnv ORACLE_HOME /usr/local/oracle/OraHome
SetEnv ORACLE_SID TESTDB.WORLD
SetEnv TNS_ADMIN /usr/local/oracle/OraHome/network/admin/tnsnames.ora
SetEnv TWO_TASK /usr/local/oracle/OraHome/network/admin/tnsnames.ora
SetEnv NLS_LANG English_America.WE8ISO8859P1

And here is the backtrace:

bash-2.05# gdb /usr/local/apache/bin/httpd 
GNU gdb 5.2.1
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.9"...
(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0xffffffff7d03b84c in strlen () from /usr/lib/64/libc.so.1
(gdb) bt
#0  0xffffffff7d03b84c in strlen () from /usr/lib/64/libc.so.1
#1  0xffffffff7d843e68 in snauca_check_adapter ()
   from /usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#2  0xffffffff7d841d58 in nau_viat () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#3  0xffffffff7d838454 in nau_gettab () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#4  0xffffffff7d8360a0 in nau_ini () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#5  0xffffffff7d827084 in nainit () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#6  0xffffffff7d7ce8b0 in nsnainit () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#7  0xffffffff7d7c0070 in nsopen () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#8  0xffffffff7d7a59e0 in nscall1 () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#9  0xffffffff7d7a4e28 in nscall () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#10 0xffffffff7d85e6dc in niotns () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#11 0xffffffff7d857fe8 in nigcall () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#12 0xffffffff7d7dfd54 in osncon () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#13 0xffffffff7d5b39dc in kpuadef () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#14 0xffffffff7d67b5fc in upiini () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#15 0xffffffff7d666554 in upiah0 () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#16 0xffffffff7d5b3308 in kpuatch () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#17 0xffffffff7d657084 in OCIServerAttach () from
/usr/local/oracle/OraHome/lib/libclntsh.so.9.0
#18 0x10007684c in _oci_open_server (
    dbname=0x10048fc30 "(DESCRIPTION = \n    (ADDRESS_LIST =\n     
(ADDRESS = (PROTOCOL = TCP)(HOST = 176.175.0.140)(PORT = 1521))\n    )\n  
 (CONNECT_DATA =\n      (SERVICE_NAME = ldrbrd.world)\n    )\n)",
persistent=0) at oci8.c:2427
#19 0x100077684 in oci_do_connect (ht=3, return_value=0x10048fe80,
this_ptr=0x0, 
    return_value_used=1, persistent=0, exclusive=0) at oci8.c:2578
#20 0x10007f0a0 in zif_ocilogon (ht=3, return_value=0x10048fe80,
this_ptr=0x0, return_value_used=1)
    at oci8.c:4203
#21 0x1001e5a28 in execute (op_array=0x10048b0f0) at zend_execute.c:1598
#22 0x1001a1700 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at zend.c:812
#23 0x10002c100 in php_execute_script (primary_file=0xffffffff7ffff130) at
main.c:1383
#24 0x1001b67b4 in apache_php_module_main (r=0x1004804c0,
display_source_mode=0)
    at sapi_apache.c:90
#25 0x100024b30 in send_php (r=0x1004804c0, display_source_mode=0, 
    filename=0x100481598 "/usr/local/apache/htdocs/test.php") at
mod_php4.c:575
#26 0x100024bc0 in send_parsed_php (r=0x1004804c0) at mod_php4.c:590
#27 0x10021fb58 in ap_invoke_handler (r=0x1004804c0) at http_config.c:518
#28 0x1002480fc in process_request_internal (r=0x1004804c0) at
http_request.c:1308
#29 0x10024819c in ap_process_request (r=0x1004804c0) at
http_request.c:1324
#30 0x1002370b4 in child_main (child_num_arg=0) at http_main.c:4603
---Type <return> to continue, or q <return> to quit---
#31 0x100237428 in make_child (s=0x100408a30, slot=0, now=1036448741) at
http_main.c:4718
#32 0x100237728 in startup_children (number_to_start=5) at
http_main.c:4800
#33 0x1002386f4 in standalone_main (argc=2, argv=0xffffffff7ffffc98) at
http_main.c:5108
#34 0x100239ab4 in main (argc=2, argv=0xffffffff7ffffc98) at
http_main.c:5456
(gdb) frame 21
#21 0x1001e5a28 in execute (op_array=0x10048b0f0) at zend_execute.c:1598
1598                                                   
((zend_internal_function *)
EX(function_state).function)->handler(EX(opline)->extended_value,
EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr,
return_value_used TSRMLS_CC);
(gdb)


-- 
Edit bug report at http://bugs.php.net/?id=20249&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20249&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20249&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20249&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20249&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20249&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20249&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20249&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20249&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20249&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20249&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20249&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20249&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20249&r=isapi

Reply via email to