From: krishean+php at gmail dot com Operating system: Windows 7 x64 PHP version: 5.5.3 Package: LDAP related Bug Type: Bug Bug description:sysconfdir broken in 64-bit Windows build
Description: ------------ When trying to bind to an ldap server over ssl, you need a file called "ldap.conf" in the directory "C:\openldap\sysconf" with a few options in it (at least on Windows, Linux is somewhere in /etc.) In the past (php 5.4 etc.) this worked wonderfully, with php checking that directory, loading the file, and connecting to the server just fine. In php 5.5.3 however, this is completely broken. I used Process Monitor to check where it was searching for ldap.conf and it seems to be searching as such: "G:\Documents\Projects\ProjectName\%SYSCONFDIR%\ldap.conf" (the ProjectName directory being where the currently executing script is located.) I checked and php 5.4.18 checks in the correct directory: "C:\openldap\sysconf\ldap.conf" Test script: --------------- $host = 'ldaps://server01'; $port = 636; $rdn = 'CN=Jeff Smith,CN=users,DC=fabrikam,DC=com'; $pwd = 'password'; if(($conn = @ldap_connect($host, $port)) != FALSE){ ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($conn, LDAP_OPT_REFERRALS, 0); // bind to ldap connection if(($r = @ldap_bind($conn, $rdn, $pwd)) != FALSE){ echo("Successfully connected to LDAP.\n"); }else{ echo("Error: Failed to bind to LDAP.\n"); // this happens if($conn){ ldap_unbind($conn); } $conn = null; } }else echo("Error: Failed to connect to LDAP.\n"); Expected result: ---------------- Script should bind to ldap server over ssl (ldaps://) and report success. Actual result: -------------- Script fails to bind to ldap server over ssl. -- Edit bug report at https://bugs.php.net/bug.php?id=65642&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65642&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65642&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65642&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65642&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65642&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65642&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65642&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65642&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65642&r=support Expected behavior: https://bugs.php.net/fix.php?id=65642&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65642&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65642&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65642&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65642&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65642&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65642&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65642&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65642&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65642&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65642&r=mysqlcfg