[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: impossible de me connecter au serveur LDAP



Le samedi 5 juin 2010, Erwan David a écrit :
> Le Sat  5/06/2010, corbie@free.fr disait
> > Le samedi 5 juin 2010, Erwan David a écrit :
> > > Le Sat  5/06/2010, corbie@free.fr disait
> > > > Bonjour,
> > > > 
> > > > Voici mes infos dans "ldap.php" :
> > > > ---------------------------------------------------------
> > > > <?php
> > > >    $server="127.0.0.1";
> > > >    $port="389";
> > > >    $racine="dc=rezo,dc=net";
> > > >    $rootdn="cn=admin,dc=rezo,dc=net";
> > > >    $rootpw="secret";
> > > > echo "Connexion...<br>";
> > > > $ds=ldap_connect($server);
> > > > if ($ds=="1")  {
> > > > $r=ldap_bind($ds,$rootdn,$rootpw);
> > > > echo "Deconnexion...<br>";
> > > > ldap_close($ds);
> > > >  }
> > > > else { echo  "Impossible de se connecter au serveur LDAP !"; exit(); }
> > > > ...............
> > > > -----------------------------------------------------------
> > > > Et à l'appel du fichier "ldap.php" http://127.0.0.1/ldap.php ,
> > > > j'ai ce message d'erreur :
> > > > "annuaire LDAP : Connexion... Impossible de se connecter au serveur LDAP !"
> > > > Ou serait l'erreur dans les scripts ?
> > > > Merci d'une aide ...
> > ------------------
> > > Et dans les logs du serveur LDAP ?
> > > Erwan
> Sous debian les logs du serveur doivent être dans /var/log/debug :
----------------------------------
Jun  5 19:44:56 debian-salon slapd[6175]: get_filter: unknown filter type=48
Jun  5 19:44:57 debian-salon slapd[6175]: <= bdb_substring_candidates: (sn) not indexed
Jun  5 19:44:57 debian-salon slapd[6175]: <= bdb_substring_candidates: (cn) not indexed
Jun  5 19:44:57 debian-salon slapd[6175]: get_filter: unknown filter type=48
Jun  5 19:44:58 debian-salon slapd[6175]: <= bdb_substring_candidates: (sn) not indexed
Jun  5 19:44:58 debian-salon slapd[6175]: <= bdb_substring_candidates: (cn) not indexed
Jun  5 19:44:58 debian-salon slapd[6175]: get_filter: unknown filter type=48
Jun  5 19:44:58 debian-salon slapd[6175]: <= bdb_substring_candidates: (sn) not indexed
Jun  5 19:44:58 debian-salon slapd[6175]: <= bdb_substring_candidates: (cn) not indexed
Jun  5 19:44:58 debian-salon slapd[6175]: get_filter: unknown filter type=48
Jun  5 19:44:58 debian-salon slapd[6175]: <= bdb_substring_candidates: (sn) not indexed
Jun  5 19:44:58 debian-salon slapd[6175]: <= bdb_substring_candidates: (cn) not indexed
Jun  5 19:44:58 debian-salon slapd[6175]: get_filter: unknown filter type=48
---------------------------------------
Il semble se connecter ... en mettant  if ($ds="1") (au lieu de ==) et le navigateur indique maintenant :
annuaire LDAP : Connexion...
"Warning: ldap_bind() expects parameter 1 to be resource, string given in /var/www/ldap.php on line 25"
et
ligne 25 : $r=ldap_bind($ds,$rootdn,$rootpw);


Reply to: