ID: 38819 Updated by: [EMAIL PROTECTED] Reported By: madcoder at gmail dot com -Status: Open +Status: Feedback Bug Type: LDAP related Operating System: 2.6.15-gentoo linux amd64 PHP Version: 5.1.6 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 for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 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: ------------------------------------------------------------------------ [2006-09-14 01:29:55] madcoder at gmail dot com Description: ------------ I'm getting a segmentation fault when calling ldap_get_entries() after an ldap search. I get no errors after any of the function calls prior to ldap_get_entries() (as suggested by ldap_errno() == 0). Running a similar ldapsearch command line query returns results as expected. A similar configuration on another linux installation of the same version works with no problems. The major difference between those two servers is the CPU (the working one is an Intel P4, the one that is segfaulting is an AMD 64-bit Athlon XP) Reproduce code: --------------- <?php $_SERVER['ldap'] = ldap_connect("ldap://server.domain"); ldap_set_option($_SERVER['ldap'], LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($_SERVER['ldap'], LDAP_OPT_REFERRALS, 0); ldap_start_tls($_SERVER['ldap']); ldap_bind($_SERVER['ldap'], '[EMAIL PROTECTED]', 'password'); $r = ldap_search($_SERVER['ldap'], 'dc=fq,dc=domain,dc=name', '(sAMAccountName=someUser)'); echo "done searching\n"; $info = ldap_get_entries($_SERVER['ldap'], $r); echo "done fetching\n"; ?> Expected result: ---------------- "done fetching\n" should be printed, and $info should contain an array of entries returned from the LDAP server. Actual result: -------------- # php -e test.php done searching Segmentation fault (core dumped) ---------- # gdb php core GNU gdb 6.4 (gdb) bt #0 0x00002aaaac8cbf4b in ?? () #1 0xa6e95d9926b7ed00 in ?? () #2 0x0000555555dbe260 in ?? () #3 0x0000555555de16c0 in ?? () #4 0x00005555556a92b5 in ?? () #5 0x000000000000000f in ?? () #6 0x0000000000000001 in ?? () #7 0x000000000000000f in ?? () #8 0x00002aaaaea76cf0 in ?? () #9 0x0000000000000003 in ?? () #10 0x0000000000000000 in ?? () (I realize this backtrace is not helpful... I've tried re-emerging the php ebuild several times with the debug USE flag enabled, and it seems all the debug info is still being stripped from the binaries. I will try compiling from source with the appropriate options and reply with a more useful backtrace) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38819&edit=1
