note 124873 deleted from function.ldap-bind by cmb
| From: | cmb@php.net | Date: | Thu, 02 Apr 2020 16:31:29 +0000 |
| Subject: | note 124873 deleted from function.ldap-bind by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214407@lists.php.net to get a copy of this message | ||
Note Submitter: CB
----
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.