ID: 25764
Updated by: [EMAIL PROTECTED]
Reported By: jpbarrette at savoirfairelinux dot net
-Status: Open
+Status: Verified
Bug Type: LDAP related
Operating System: linux
PHP Version: 4CVS, 5CVS
New Comment:
got same backtrace.
Previous Comments:
------------------------------------------------------------------------
[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