[PHP-DEV] PHP 4.0 Bug #7505: ldap_get_entries causes crash From: weston <email protected>
Date: 10/28/00

From: weston <email protected>
Operating system: Linux 2.2.12
PHP version: 4.0.3pl1
PHP Bug Type: LDAP related
Bug description: ldap_get_entries causes crash

This script crashes Apache/1.3.12 with OpenLDAP 2.0.6:

$PHP_AUTH_USER = <REMOVED>;
$PHP_AUTH_PW = <REMOVED>;

$ds=ldap_connect("localhost");
$binddn = "uid=$PHP_AUTH_USER,ou=People,dc=itdonline,dc=net";
$r=ldap_bind($ds, $binddn, $PHP_AUTH_PW);
  if (!$r) {
    print ldap_error();
    exit();
  }
  
  $sr=ldap_search($ds, "ou=People,dc=itdonline,dc=net",
"uid=$PHP_AUTH_USER");
  if (!$sr) {
    print ldap_error();
    exit();
  }

  $entries = ldap_get_entries($ds, $sr);
?>

In the error log I get:
httpd: getattr.c:36: ldap_first_attribute: Assertion `( ( ld )->ld_options.ldo_valid == 0x2 )' failed.
[Fri Oct 27 15:51:38 2000] [notice] child pid 27065 exit signal Aborted (6)

The ldap_bind() and the ldap_search() complete successfully, but ldap_get_entries() causes the crash

-- 
Edit Bug report at: http://bugs.php.net/?id=7505&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>