Hello.

Have been working today with LDAP.

A problem at the very beginning.

My code:

PHP Code:
<?php
$ldapport 
389;

$ds ldap_connect("XXXXXX",$ldapport)
    or die(
"Keine Verbindung zum LDAP server möglich.");

if (
$ds) {
    
        
  if(
ldap_bind($ds'XXXX''XXXX'))
  {
      
$_SESSION['user'] = $username2;
        
$array2[]="cn";
        
$array2[]="displayName";
        
$array2[]="memberOf";
        
$array2[]="telephoneNumber";
        
$array2[]="department";
        
$array2[]="pager";
        
$array2[]="title";
        
$array2[]="mail";
        
$array2[]="ou";
        
$array2[]="mailNickname";
        
$array2[]="sn";
        
$array2[]="userAccountControl";
        
        
$variable2="OU=Notruf NÖ Mitarbeiter,DC=notrufnoe,DC=at";
        
$sr ldap_search($ds$variable2"(legacyexchangedn=*)",$array2);

    
print_r($sr);
  
ldap_close($ds);
}
else
{
    echo 
"LDPA Fehler";
}
} else {
    echo 
"<h4>Verbindung zum LDAP Server nicht möglich</h4>";
}
?>
Error:

PHP Code:
Warningldap_search() [function.ldap-search]: SearchNo such object in........ ==> $sr ldap_search(........... 
Ldap_bind => OK!

I do not go on.
Thanks for your help.
MFG Chris from Austria / Vienna