php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43186 Apache / oci8 crash
Submitted: 2007-11-04 17:40 UTC Modified: 2007-11-12 09:53 UTC
From: gw at gnc dot at Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5.2.4 OS: redhat enterprise linux server 5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gw at gnc dot at
New email:
PHP Version: OS:

 

 [2007-11-04 17:40 UTC] gw at gnc dot at
Description:
------------
Apache crashes when running an oci8 script.

PHP is 5.2.4
Apache is 2.2.6
Oracle Client is: 10.2.0.3.0 (which is the latest patch version..)
OS: Oracle Enterprise Linux Enterprise Linux Server release 5 (Carthage)

env for oracle:
export ORACLE_HOME=/opt/oracle/product/10.2.0/client_1
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG=german_germany.we8iso8859p15
export LC_ALL="de_DE"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

apache uses wwwrun user,which is member of dba group
oracle sw belongs to oracle:dba

php configure:
'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql' '--with-oci8=/opt/oracle/product/10.2.0/client_1' '--enable-ftp' '--with-gettext' '--with-zlib' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-mcrypt' '--with-curl' '--enable-pdo' '--with-pdo-oci=/opt/oracle/product/10.2.0/client_1' '--with-imap=/root/software/imap-2006k.DEV.SNAP-0711021517'

played around with:
;oci8.default_prefetch = 10
OR
oci8.default_prefetch = 10
OR
oci8.default_prefetch = 0
no change...

Reproduce code:
---------------
?php
        error_reporting(255);

        echo "connecting...\n";
        $db = oci_connect("gwtest","gwtest","ENTW");
        if(!$db)
                die("oci_connect error");

        $s = oci_parse($db,"select * from cat");
        oci_execute($s);
        oci_fetch_all($s,$res);

        print_r($res);

        oci_close($db);
?>


Expected result:
----------------
objects of schema gwtest

Actual result:
--------------
(gdb) run -X
Starting program: /usr/local/apache2/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread -1208908096 (LWP 17198)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208908096 (LWP 17198)]
0x0203414c in lxhcsn () from /opt/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
(gdb) bt
#0  0x0203414c in lxhcsn () from /opt/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#1  0x018caad2 in kpcsnevget () from /opt/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#2  0x0184ff56 in OCINlsEnvironmentVariableGet ()
   from /opt/oracle/product/10.2.0/client_1/lib/libclntsh.so.10.1
#3  0x011e74c3 in php_oci_do_connect_ex (username=0x99f8090 "gwtest", username_len=6,
    password=0x99f80a0 "gwtest", password_len=6, new_password=0x0, new_password_len=0,
    dbname=0x99f80c8 "ENTW", dbname_len=4, charset=0x0, session_mode=0, persistent=0, exclusive=0)
    at /root/software/php-5.2.4/ext/oci8/oci8.c:1067
#4  0x011e8dc7 in php_oci_do_connect (ht=3, return_value=0x99f80d8, return_value_ptr=0x0, this_ptr=0x0,
    return_value_used=1, persistent=0, exclusive=0) at /root/software/php-5.2.4/ext/oci8/oci8.c:983
#5  0x011f41cd in zif_oci_connect (ht=3, return_value=0x99f80d8, return_value_ptr=0x0, this_ptr=0x0,
    return_value_used=1) at /root/software/php-5.2.4/ext/oci8/oci8_interface.c:1557
#6  0x0138aac8 in zend_do_fcall_common_helper_SPEC (execute_data=0xbf855420)
    at /root/software/php-5.2.4/Zend/zend_vm_execute.h:200
#7  0x01389b1d in execute (op_array=0x99f73c8) at /root/software/php-5.2.4/Zend/zend_vm_execute.h:92
#8  0x0136c582 in zend_execute_scripts (type=8, retval=<value optimized out>, file_count=3)
    at /root/software/php-5.2.4/Zend/zend.c:1134
#9  0x0132cae3 in php_execute_script (primary_file=0xbf8576c8) at /root/software/php-5.2.4/main/main.c:1982
#10 0x013e49ac in php_handler (r=0x9a33f50) at /root/software/php-5.2.4/sapi/apache2handler/sapi_apache2.c:631
#11 0x08079c39 in ap_run_handler (r=0x9a33f50) at config.c:157
#12 0x0807cda7 in ap_invoke_handler (r=0x9a33f50) at config.c:372
#13 0x080a9608 in ap_process_request (r=0x9a33f50) at http_request.c:258
#14 0x080a690b in ap_process_http_connection (c=0x9a2dd78) at http_core.c:184
#15 0x08080b79 in ap_run_process_connection (c=0x9a2dd78) at connection.c:43
#16 0x080c49b0 in child_main (child_num_arg=<value optimized out>) at prefork.c:640
#17 0x080c4c13 in make_child (s=0x982b668, slot=0) at prefork.c:680
#18 0x080c59ec in ap_mpm_run (_pconf=0x98250a8, plog=0x98671b0, s=0x982b668) at prefork.c:956
#19 0x080679c5 in main (argc=159527072, argv=0x9a2bba0) at main.c:730
(gdb)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-05 11:10 UTC] gw at gnc dot at
addition to the line 'env for oracle:'
this environment is also set in apachectl
so apache has the same env as oracle....
 [2007-11-12 09:53 UTC] tony2001@php.net
Doesn't look like PHP problem, since the OCINlsEnvironmentVariableGet() is perfectly legal.
Please try contacting Oracle and reporting this problem to them.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 04:01:31 2025 UTC