#19434 [Opn->Fbk]: oci8 + ldap -> crash

From: Date: Mon, 16 Sep 2002 14:41:09 +0000
Subject: #19434 [Opn->Fbk]: oci8 + ldap -> crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19462@lists.php.net to get a copy of this message
ID: 19434 Updated by: sander@php.net Reported By: ronan.salmon@staff.ittralee.ie -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: redhat 7.3 PHP Version: 4.2.3 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-09-16 09:32:48] ronan.salmon@staff.ittralee.ie I recompiled php (see below) and apache still crashes. './configure' 'i386-redhat-linux' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared,/home/oracle/Oracle-9.0.1' '--with-mysql=shared,/usr' '--with-oci8=shared,/home/oracle/Oracle-9.0.1' '--enable-sigchild' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-mbstring' '--enable-mbstr-enc-trans' '--with-apxs=/usr/sbin/apxs' ------------------------------------------------------------------------ [2002-09-16 07:13:50] sniper@php.net Oracle has it's own ldap stuff. You can't compile both openldap and oracle together. But you don't need to: --with-ldap=/home/oracle/Oracle-9.0.1 works too. ------------------------------------------------------------------------ [2002-09-16 06:49:24] ronan.salmon@staff.ittralee.ie php-4.2.3 apache-1.3.23-14 redhat 7.3 kernel 2.4.18-10 i686 oracle 9.0.1 openldap 2.0.23 Configure command : './configure' 'i386-redhat-linux' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-oci8=shared,/home/oracle/Oracle-9.0.1' '--enable-sigchild' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-mbstring' '--enable-mbstr-enc-trans' '--with-apxs=/usr/sbin/apxs' If I use ldap functions only, everything is fine. If I use oci8 functions only, everything is fine. If in the same script I use oci8 and ldap functions, apache crashes : [Mon Sep 16 12:44:39 2002] [notice] child pid 31257 exit signal Segmentation fault (11) here the script : <? include("../config/oci8.php"); include("../config/settings.php"); $strLogin = "test"; $strPasswd = "test"; $connLDAP = ldap_connect(DEFAULT_LDAP_HOSTNAME); if (!$connLDAP) { echo "Failed to connect to " . DEFAULT_LDAP_HOSTNAME; exit; } if (!$strPasswd) { // generate a bogus password to pass if the user doesn't give us one // this gets around systems that are anonymous search enabled $strPasswd = crypt(microtime()); } // Lookup user @ldap_bind($connLDAP); $arrInfo = ldap_get_entries($connLDAP, ldap_search($connLDAP, DEFAULT_STAFF_EMAIL_PEOPLE, "uid=$strLogin")); $strDN = $arrInfo[0]["dn"]; $boolLogin = @ldap_bind($connLDAP, $strDN, $strPasswd); if (!$boolLogin) { echo "<BR>Wrong username or password!<P>\n"; exit; } // Logged in successfully $DB = ocilogon($strUser, $strPassword, $strDB); if (! $DB) { $err = OCIError(); echo "Can not connect to $strDB : $err<B>\n"; die(); } $strSQL = "SELECT * FROM Account_Users WHERE ID = '$strLogin'"; $stmt = ociparse($DB, $strSQL); ociexecute($stmt, OCI_DEFAULT); if (ocifetch($stmt)) { echo "Success"; } else { echo "Failed"; } ocilogoff($DB); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19434&edit=1

« previous php.bugs (#19462) next »