note 120020 added to ref.ldap
| From: | llurovi at gmail dot com | Date: | Tue, 11 Oct 2016 10:12:23 +0000 |
| Subject: | note 120020 added to ref.ldap | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-206832@lists.php.net to get a copy of this message | ||
For those of you that are having trouble when user's password has special characters, make sure
you decode the string to an appropiate codification. For instance, I had an issue where some users
could not logging properly into our web app.
Example of a simple connection:
<?php
$ldap_ip = 'LDAP-SERVER-IP';
$ldap = ldap_connect($ldap_ip);
$user = 'Test';
$password = 'otoño'; //This password is correct but binding it with this format will
give us an error
$password = utf8_decode($password); //$password = otoxF1o
$ldap_bind = ldap_bind($ldap, $user, $password); //Now the binding is successfull and $ldap_bind =
true
?>
----
Server IP: 72.52.91.14
Probable Submitter: 85.158.138.21 (proxied: 195.81.50.240)
----
Manual Page -- http://php.net/manual/en/ref.ldap.php
Edit -- https://master.php.net/note/edit/120020
Del: integrated -- https://master.php.net/note/delete/120020/integrated
Del: useless -- https://master.php.net/note/delete/120020/useless
Del: bad code -- https://master.php.net/note/delete/120020/bad+code
Del: spam -- https://master.php.net/note/delete/120020/spam
Del: non-english -- https://master.php.net/note/delete/120020/non-english
Del: in docs -- https://master.php.net/note/delete/120020/in+docs
Del: other reasons-- https://master.php.net/note/delete/120020
Reject -- https://master.php.net/note/reject/120020
Search -- https://master.php.net/manage/user-notes.php