[php-src] Issue #22130: Default-Search path for ldap.conf changed to D:\a\winlib-builder\winlib-builder\install\etc\openldap\ldap.conf
| From: | HoffmannTom | Date: | Fri, 22 May 2026 18:16:45 +0000 |
| Subject: | [php-src] Issue #22130: Default-Search path for ldap.conf changed to D:\a\winlib-builder\winlib-builder\install\etc\openldap\ldap.conf | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-252118@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/22130
Author: HoffmannTom
### Description
The following code:
```php
<?php
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
$conn = ldap_connect("ldaps://ldap-server-here.com", 636) or die("no
connection.");
echo "connect successful";
ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3);
$ldapbind = ldap_bind($conn, 'user@domain.com', 'password');
echo "bind successfull";
if ($ldapbind) {
echo "LDAP bind successful";
} else {
echo "LDAP bind failed";
echo ldap_error($conn);
}
```
Resulted in this output:
```
...
ldap_init: trying D:\a\winlib-builder\winlib-builder\install\etc\openldap\ldap.conf
...
```
But I expected this output instead:
```
ldap_init: trying c:\openldap\sysconf\ldap.conf
```
I installed PHP 8.5.6 and encountered issue with self-signed certificate and LDAPs connection. In
the previous PHP versions, PHP-LDAP-Module was searching for ldap.conf in folder
c:\openldap\sysconf\ on windows system.
Somehow, this default path changed to the cryptic path
D:\a\winlib-builder\winlib-builder\install\etc\openldap\ldap.conf
I used the package php-8.5.6-nts-Win32-vs17-x64.zip
Manually setting LDAPCONF works but the default shouldn't have changed to this cryptic path
imho.
### PHP Version
```plain
PHP 8.5.6 (cli) (built: May 6 2026 09:31:48) (NTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Built by The PHP Group
Zend Engine v4.5.6, Copyright (c) Zend Technologies
with Zend OPcache v8.5.6, Copyright (c), by Zend Technologies
```
### Operating System
Windows 2016