#26409 [Opn->Bgs]: ldap_bind is causing a seg fault
| From: | sniper@php.net | Date: | Tue, 25 Nov 2003 20:40:29 +0000 |
| Subject: | #26409 [Opn->Bgs]: ldap_bind is causing a seg fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-51053@lists.php.net to get a copy of this message | ||
ID: 26409
Updated by: sniper@php.net
Reported By: pyrox_pro at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: LDAP related
Operating System: RedHat Linux 7.3
PHP Version: 4.3.4
New Comment:
Actually..when using Oracle with PHP, you should point --with-ldap to
that too..they're nice people and have put their own ldap functions
into their libs. This conflicts with the openldap functions and causes
this kind of problems.
Not PHP bug per se.
Previous Comments:
------------------------------------------------------------------------
[2003-11-25 15:31:13] pyrox_pro at hotmail dot com
If I must submit a backtrace it will be next week before I can get to
that, this is important to me so I def. want to help.
I got the code running again by going back to verion PHP Version
4.3.2-RC (php4-STABLE-200303141430) and manually updating PEAR.
Here is my configure:
./configure' '--with-oci8' '--prefix=/usr/local/apache'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-mod_charset'
'--enable-force-cgi-redirect' '--enable-discard-path'
'--with-config-file-path=/usr/local/apache/conf' '--enable-safe-mode'
'--with-openssl' '--enable-bcmath' '--with-bz2'
'--enable-calendar'
'--enable-ctype' '--with-gdbm' '--enable-dbase'
'--enable-ftp'
'--with-gd' '--with-ttf' '--enable-gd-native-ttf'
'--enable-gd-imgstrttf' '--with-jpeg-dir=/usr/local'
'--enable-gd-imgstrttf' '--with-gmp' '--with-mysql'
'--with-xml=shared'
'--enable-shmop' '--enable-sockets' '--with-regex=php'
'--enable-sysvsem' '--enable-sysvshm' '--enable-yp'
'--enable-memory-limit' '--enable-shared' '--with-zlib'
'--with-sybase-ct=/usr/local/freetds' '--with-ldap' '--enable-yp'
'--with-xml=shared' '--with-curl'
Is there any other method of getting you the info you need, for
example:
bash# strace /path/to/php /path/to/script.php
Thanks for looking into this.
------------------------------------------------------------------------
[2003-11-25 14:26:13] sniper@php.net
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.
And also the full configure line would be good to know..
------------------------------------------------------------------------
[2003-11-25 12:15:25] pyrox_pro at hotmail dot com
Description:
------------
ldap_bind is causing a seg fault on every use.
I submitted a similar bug in the past and was supplied a CVS snapshot
to use, I had been using that up until now, I installed php-4.3.4 and a
new problem that is similar rears its head:
http://bugs.php.net/bug.php?id=22686
echo "<BR>Connecting...";
$ds=ldap_connect("ldaps://".$ldap['SERV']."/") or
die("<BR>Died.");
echo "<BR> Connection Established: $ds";
echo "<BR> BINDING...";
$r=ldap_bind($ds,$ldap['user'],$ldap['pass']);
echo "<BR> BIND COMPLETE.";
This results in a seg fault:
Connecting...
Connection Established: Resource id #4
BINDING...
************** -> Segmentation fault
[Tue Nov 25 10:31:38 2003] [notice] child pid 26178 exit signal
Segmentation fault (11)
If I comment this out:
echo "<BR>Connecting...";
$ds=ldap_connect("ldaps://".$ldap['SERV']."/") or
die("<BR>Died.");
echo "<BR> Connection Established: $ds";
echo "<BR> BINDING...";
##$r=ldap_bind($ds,$ldap['user'],$ldap['pass']);
echo "<BR> BIND COMPLETE.";
The page comes up and it seems to work fine.
I am using php 4.3.4 and LDAP:
ldap
LDAP Support enabled
RCS Version $Id: ldap.c,v 1.130.2.9 2003/10/07 00:36:27 iliaa Exp $
Total Links 0/unlimited
API Version 2004
Vendor Name OpenLDAP
Vendor Version 20026
OCI8 Support enabled
Revision $Revision: 1.183.2.5 $
Oracle Version 8.1
Compile-time ORACLE_HOME /u01/app/oracle/product/8.1.6
Libraries Used no value
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7 31 Dec 2002
Reproduce code:
---------------
$ds=ldap_connect("ldaps://".$ldap['SERV']."/");
$r=ldap_bind($ds);
Expected result:
----------------
Annon bind to the ldap resource id obtained from ldap_connect.
Actual result:
--------------
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26409&edit=1