Bug #65642 [Asn->Fbk]: sysconfdir broken in 64-bit Windows build
| From: | ab@php.net | Date: | Tue, 10 Sep 2013 08:10:40 +0000 |
| Subject: | Bug #65642 [Asn->Fbk]: sysconfdir broken in 64-bit Windows build | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-181504@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65642&edit=1
ID: 65642
Updated by: ab@php.net
Reported by: krishean+php at gmail dot com
Summary: sysconfdir broken in 64-bit Windows build
-Status: Assigned
+Status: Feedback
Type: Bug
Package: LDAP related
Operating System: Windows 7 x64
PHP Version: 5.5.3
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
Please test the builds from here
http://windows.php.net/downloads/snaps/ostc/65642/
(if possible both x64 and x86),
they should have correct compiled in path.
Previous Comments:
------------------------------------------------------------------------
[2013-09-09 15:40:37] krishean+php at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=65642&edit=1