Bug #18503: PHP dies when oci8 modules is loaded as extension.
| From: | venere at radiumssytems dot com dot br | Date: | Tue, 23 Jul 2002 17:28:21 +0000 |
| Subject: | Bug #18503: PHP dies when oci8 modules is loaded as extension. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-14917@lists.php.net to get a copy of this message | ||
From: venere@radiumssytems.com.br
Operating system: Conectiva Linux
PHP version: 4.1.2
PHP Bug Type: OCI8 related
Bug description: PHP dies when oci8 modules is loaded as extension.
This problem ocurred qhen i tried to use php 4.1.1 with oci8, and it still
happens with 4.1.2.
The version i use is the RPM package that comes with Conectiva Linux
version 7/8. the configure line, taken from phpinfo(), is as follow:
-------------------------------------------------------------------------------------------------
'./configure' '--prefix=/usr' '--disable-debug'
'--enable-pic'
'--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs'
'--enable-shared' '--disable-static'
'--with-config-file-path=/etc/php4/apache' '--with-exec-dir=/usr/bin'
'--with-regex=system' '--with-gettext' '--with-freetype-dir=/usr'
'--with-gd' '--with-jpeg-dir=/usr' '--with-png'
'--with-zlib' '--with-db2'
'--with-db3' '--with-gdbm' '--enable-debugger'
'--enable-openssl'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars'
'--enable-yp'
'--enable-wddx' '--enable-snmp' '--enable-dbf'
'--enable-ftp'
'--enable-bcmath' '--without-mysql' '--without-unixODBC'
'--with-xml'
-----------------------------------------------------------------------------
I have compiled the standalone oci8 module from php 4.1.2 source code,
running phpize, then ./configure and make. After copying the module to
it's right place, configuring Oracle Client 8.1.7, its variables and
php.ini, i have made a little script to test the CGI version. The script
is showed below:
<?php
echo "start here\n";
$a=ocilogon("itautst","itautst","dv01");
var_dump($a);
echo "end here\n";
?>
Afeter running "php oratest.php" i got a segmentation fault. Below is a
backtrace of this process.
[root@distro /root]# gdb php
GNU gdb 5.0
Copyright 2000 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 "i386-conectiva-linux"...(no debugging symbols
found)...
(gdb) run
Starting program: /usr/bin/php
[New Thread 1024 (LWP 1187)]
<?php
echo "start here\n";
$a=ocilogon("passwd","login","dv01");
var_dump($a);
echo "end here\n";
?>
X-Powered-By: PHP/4.1.1
Content-type: text/html
start here
resource(3) of type (oci8 connection)
end here
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 1187)]
0x40b3cb9c in ?? ()
(gdb) bt
#0 0x40b3cb9c in ?? ()
#1 0x4021219f in __libc_start_main (main=0x80614a8 <main>, argc=1,
ubp_av=0xbffff9b4, init=0x805f940 <_init>, fini=0x8139254 <_fini>,
rtld_fini=0x4000cf68 <_dl_fini>, stack_end=0xbffff9ac) at
../sysdeps/generic/libc-start.c:129
(gdb)
--------------------------------------------------------------------------
As you can see, the connection is made without problems, and only when the
script ends the segmentation fault occurs. The back trace shows nothing to
me, but it looks like it's a problem dealocating the oci8 module.
I've made another script, that just printed something on screen (just an
echo "something";), and got the same error! If i remove the
"extension=oci8.so" from php.ini, the script runs fine, but the first one
gives me "undefined function ocilogon()".
This problem occurs with the apache module version as well. i have other
machines running php with other database (PostgreSQL and MySQL), using the
same configuration, and i can't reproduce the problem with them.
--
Edit bug report at http://bugs.php.net/?id=18503&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18503&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18503&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18503&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18503&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18503&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18503&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18503&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18503&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18503&r=globals