php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18503 PHP dies when oci8 modules is loaded as extension.
Submitted: 2002-07-23 13:28 UTC Modified: 2002-08-20 09:27 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: venere at radiumsystems dot com dot br Assigned:
Status: Closed Package: OCI8 related
PHP Version: 4.1.2 OS: Conectiva Linux
Private report: No CVE-ID: None
 [2002-07-23 13:28 UTC] venere at radiumsystems dot com dot br
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-23 13:30 UTC] venere at radiumsystems dot com dot br
wrong e-mail. fixing it...
 [2002-08-20 09:27 UTC] edink@php.net
You will need to recompile your PHP and Apache with pthread support as described in http://www.php.net/manual/en/ref.oci8.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC