|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-10-06 14:46 UTC] 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(!@ldap_bind($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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 13:00:01 2025 UTC |
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