note 124873 added to function.ldap-bind
| From: | CB@php.net | Date: | Thu, 02 Apr 2020 16:05:05 +0000 |
| Subject: | note 124873 added to function.ldap-bind | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214405@lists.php.net to get a copy of this message | ||
This threw me for a LONG time. I upgraded PHP from 5.4 to 7.2 and started getting errors binding to
AD. The solution was to add 'ldap://' to the front of the IP address I was using, like
this:
$ldapConnection = ldap_connect('10.0.0.2'); // works under 5.4, fails under 7.2
$ldapConnection = ldap_connect('ldap://10.0.0.2'); // works for all
Hope that saves someone time.
----
Server IP: 45.112.84.4
Probable Submitter: 38.142.137.34 (proxied: 2601:58c:407f:2530:8c2b:7555:c4ef:5ffd)
----
Manual Page -- http://php.net/manual/en/function.ldap-bind.php
Edit -- https://master.php.net/note/edit/124873
Del: integrated -- https://master.php.net/note/delete/124873/integrated
Del: useless -- https://master.php.net/note/delete/124873/useless
Del: bad code -- https://master.php.net/note/delete/124873/bad+code
Del: spam -- https://master.php.net/note/delete/124873/spam
Del: non-english -- https://master.php.net/note/delete/124873/non-english
Del: in docs -- https://master.php.net/note/delete/124873/in+docs
Del: other reasons-- https://master.php.net/note/delete/124873
Reject -- https://master.php.net/note/reject/124873
Search -- https://master.php.net/manage/user-notes.php