ID: 25764 Updated by: [EMAIL PROTECTED] Reported By: jpbarrette at savoirfairelinux dot net -Status: Verified +Status: Closed Bug Type: LDAP related Operating System: linux PHP Version: 4CVS, 5CVS New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-10-06 18:10:48] [EMAIL PROTECTED] got same backtrace. ------------------------------------------------------------------------ [2003-10-06 16:25:17] jpbarrette at savoirfairelinux dot net this is the backtrace but of the 4.3.4RC1 version. (so the problem is in the 4.3.4RC1 version too) #0 0x40260883 in strlen () from /lib/i686/libc.so.6 #1 0x0807e5d2 in zif_ldap_get_option (ht=136439660, return_value=0x2, this_ptr=0x0, return_value_used=0) at /home/jpbarrette/tmp/php-4.3.4RC1/ext/ldap/ldap.c:1621 #2 0x0817c3df in execute (op_array=0x821e76c) at /home/jpbarrette/tmp/php-4.3.4RC1/Zend/zend_execute.c:1616 #3 0x0816c785 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/jpbarrette/tmp/php-4.3.4RC1/Zend/zend.c:885 #4 0x0813bc43 in php_execute_script (primary_file=0xbffff240) at /home/jpbarrette/tmp/php-4.3.4RC1/main/main.c:1723 #5 0x081820aa in main (argc=2, argv=0xbffff2d4) at /home/jpbarrette/tmp/php-4.3.4RC1/sapi/cli/php_cli.c:819 #6 0x401fdc57 in __libc_start_main () from /lib/i686/libc.so.6 ------------------------------------------------------------------------ [2003-10-06 16:13:15] [EMAIL PROTECTED] Please generate a backtrace of the crash. ------------------------------------------------------------------------ [2003-10-06 14:46:10] jpbarrette at savoirfairelinux dot net Description: ------------ when I'm trying to get the LDAP_OPT_ERROR_STRING option, by the ldap_get_option function, after the ldap_bind function faillure, php is segfaulting. Reproduce code: --------------- <?php $host = "localhost"; $user = ""; $passwd = ""; $connection = @ldap_connect($this->host, $this->port); if(!$connection){ die("unable to connect"); } if([EMAIL PROTECTED]($connection, $user, $passwd)){ echo ldap_error($connection); $error = ""; echo ldap_get_option($connection, LDAP_OPT_ERROR_STRING, $error); } ?> Expected result: ---------------- I'm expecting to get the LDAP_OPT_ERROR_STRING value ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25764&edit=1