|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44238 Using LDAP causes script crash
Submitted: 2008-02-24 22:55 UTC Modified: 2008-03-04 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: BenBE at omorphia dot de Assigned:
Status: No Feedback Package: LDAP related
PHP Version: 5.2.5 OS: Debian Etch
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-02-24 22:55 UTC] BenBE at omorphia dot de
When updating PHP5 to the latest version (5.2.5-2 or newer), using the LDAP extension produces a crash, causing the script to abort.

Version 5.2.4-2 was latest version, that didn't crash that way. Also tried with 5.2.5-2, but same problem.

Reproduce code:
function get_ldap_name($unix)
	$ds = ldap_connect("");
	$ldap_arr = get_ldap_info($unix, $ds);
	if ((is_array($ldap_arr)) && array_key_exists(0, $ldap_arr)) {
		$data = $ldap_arr[0]['cn'][0];
		return $data;
	return false;

Expected result:
Script returns the full name of the user specified

Actual result:
tail -f /var/log/apache2/error.log

apache2: getattr.c:80: ldap_first_attribute: Assertion `len != 0' failed.
[Sun Feb 24 23:23:09 2008] [notice] child pid 1578 exit signal Aborted (6)
apache2: getattr.c:80: ldap_first_attribute: Assertion `len != 0' failed.
[Sun Feb 24 23:23:14 2008] [notice] child pid 1580 exit signal Aborted (6)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-04 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 22:01:28 2024 UTC