|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-01-23 08:52 UTC] wxianda at gmail dot com
Description:
------------
use the latest php 5.3.5, tested in:
gcc 4.4.5, ubuntu 10.10 x86, oracle express;
gcc ???, asia linux 2(same as RHEL5?) x86, oracle 10g R2;
gcc ???, centos 4.5 x86, oracle 10g R1.
./configure --disable-all --disable-cgi --without-pear --with-
oci8=shared,$ORACLE_HOME
make
php.ini:
extension_dir = "./modules"
extension = oci8.so
oci8.privileged_connect = On
environment variable ORACLE_HOME and ORACLE_SID are both correct.
when using NULL as connection_string in oci_connect() to connect to oracle:
sapi/cli/php -c php.ini -r "oci_internal_debug(TRUE);
var_dump(oci_connect('sys', 'sys', NULL, NULL, OCI_SYSDBA));"
it crashes:
OCI8 DEBUG: OCIHandleAlloc at (/home/xianda/php-5.3.5.orig/ext/oci8/oci8.c:1067)
OCI8 DEBUG: OCIConnectionPoolCreate at (/home/xianda/php-
5.3.5.orig/ext/oci8/oci8.c:1068)
OCI8 DEBUG: OCIConnectionPoolDestroy at (/home/xianda/php-
5.3.5.orig/ext/oci8/oci8.c:1069)
OCI8 DEBUG: OCIHandleFree at (/home/xianda/php-5.3.5.orig/ext/oci8/oci8.c:1070)
OCI8 DEBUG: OCINlsEnvironmentVariableGet at (/home/xianda/php-
5.3.5.orig/ext/oci8/oci8.c:1826)
OCI8 DEBUG L1: Got NO cached connection at (/home/xianda/php-
5.3.5.orig/ext/oci8/oci8.c:1871)
OCI8 DEBUG: Bypassing client-side session pool for session create at
(/home/xianda/php-5.3.5.orig/ext/oci8/oci8.c:2833)
OCI8 DEBUG: OCIEnvNlsCreate at (/home/xianda/php-
5.3.5.orig/ext/oci8/oci8.c:2810)
OCI8 DEBUG: OCIHandleAlloc at (/home/xianda/php-5.3.5.orig/ext/oci8/oci8.c:2842)
OCI8 DEBUG: OCIServerAttach at (/home/xianda/php-
5.3.5.orig/ext/oci8/oci8.c:2850)
Segmentation fault
and the call stack shows that it crashes inside the libclntsh.so.
But if I provide a value for connection_string in oci_connect(), it works fine,
and the call stack in the libclntsh.so is different.
And I try to build php using oci8 as a "static" extension(--oci8=$ORACLE_HOME),
it also works fine when setting connection_string to NULL(this proves that my
ORACLE_HOME and ORACLE_SID are correct).
And I test this in the previous three platforms, it acts the same. And I also
try to use the latest instant client 10 and 11, the same results come out. So I
believe that it can be easily reproduced in most or all platforms.
So is it the bug of php or oracle's client library???
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 14:00:01 2025 UTC |
And I try to use LD_PRELOAD to preload the libclntsh.so at program starting, and it works just fine: $ LD_PRELOAD=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib/libclntsh.so sapi/cli/php -c php.ini -r "var_dump(oci_connect('sys', 'sys', NULL, NULL, OCI_SYSDBA));" resource(4) of type (oci8 connection) so it seems that the crash is caused by "symbol resolution"???