Bug #65642 [Fbk->Csd]: sysconfdir broken in 64-bit Windows build
| From: | ab@php.net | Date: | Tue, 10 Sep 2013 16:40:29 +0000 |
| Subject: | Bug #65642 [Fbk->Csd]: sysconfdir broken in 64-bit Windows build | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-181517@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: Feedback
+Status: Closed
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:
Thanks for testing. Please use that DLLs with 5.5.3, the regular fix will come
into the next release. In the mean time the fix can be checked in the 5.5 or
master snapshots http://windows.php.net/downloads/snaps/php-5.5/
(check in a
couple of days if interested).
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2013-09-10 15:12:27] krishean+php at gmail dot com
I tested both the x86 and x64 builds of the php_ldap (threadsafe) extension and they both seem to
work as intended, checking the "C:\openldap\sysconf\ldap.conf" file for configuraton
parameters before successfully connecting to the ldap server over ssl.
------------------------------------------------------------------------
[2013-09-10 08:10:40] ab@php.net
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.
------------------------------------------------------------------------
[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