|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-09-10 06:31 UTC] ab@php.net
-Assigned To:
+Assigned To: ab
[2013-09-10 08:10 UTC] ab@php.net
-Status: Assigned
+Status: Feedback
[2013-09-10 08:10 UTC] ab@php.net
[2013-09-10 15:12 UTC] krishean+php at gmail dot com
[2013-09-10 16:40 UTC] ab@php.net
-Status: Feedback
+Status: Closed
[2013-09-10 16:40 UTC] ab@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 31 23:00:01 2025 UTC |
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.