Skip to content

Default-Search path for ldap.conf changed to D:\a\winlib-builder\winlib-builder\install\etc\openldap\ldap.conf #22130

@HoffmannTom

Description

@HoffmannTom

Description

The following code:

<?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

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions