I am creating a ldap_bind using XAMPP 8.2.4. I am using the same commands that in the PHP Manual on my http site (not https). I have the CA Cert installed on Personal Computer cert store of the web server. Server webpage is an http site.
<?php
$adServer = "ldaps://DC01.DOMAIN.NET";
$ldap = ldap_connect($adServer);
$ldaprdn = 'DOMAIN' . "\\" . $user;
ldap_set_option($ldap,LDAP_OPT_PROTOCOL_VERSION,3);
ldap_set_option($ldap,LDAP_OPT_REFERRALS,0);
ldap_get_option($ldap, LDAP_OPT_DIAGNOSTIC_MESSAGE, $err);
$bind = ldap_bind($ldap,$ldaprdn,$password);
echo "ldap_error: $err";
if ($bind) {
echo "Bind Good";
}
else {
echo "Bind Bad";
}
?>
I am getting the following for an error:
Can't connect LDAP server
ldap_error: error:16000069:STORE routines::unregister scheme
I have tested ldap_connect and there is no problem reaching the server. So what is preventing the bind from working? Does the site need to be SSL as of PHP 8.2.4? I know as of 8.1.0 the ldap_connect was made but it was a transparent change.
UPDATE: Added SSL security to the site so it now loads at https:// but still getting the same ldap_error
Finally found the fix for it. Thanks to @Wes Wakeman for this post:
XAMPP 7.0.4 PHP 7 LDAPS Connection can't bind LDAP works fine
Even though XAMPP is not running on the same drive as the C drive the ldap.conf needs to be on C:\OpenLDAP\sysconf\ with the files. I am going to ask Apachefriends how I can move it.