By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,740 Members | 844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,740 IT Pros & Developers. It's quick & easy.

authentification ldap with php

P: n/a
Hello,
I have some problems with ldap and php fot my authentification.
I don't understand why. My DN is correct in my ldap server
Can you help me please?

My php script :

$login = $_POST['pseudo'];
$passe = $_POST['passe'];
$ldapServer = "localhost";

$loginDN = "uid=".$login.", o=people, dc=toto, dc=org";
$connexion = ldap_connect($ldapServer)
or die ("Impossible de se connecter au seveur LDAP");

if ($connexion) {
$result= ldap_bind($connexion, $loginDN, $passe);
// Identification
if ($result) {
echo "Connexion LDAP réussie";
} else {
echo "Connexion LDAP échouée";
}
}

My error message :

Warning: ldap_bind(): Unable to bind to server: Invalid credentials in
d:\www-root\php\auth_ldap.php on line 15
Connexion LDAP échouée

Thank you very much for your help.

Laurent

Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.