note 47427 added to ref.ldap

From: Date: Tue, 16 Nov 2004 07:51:46 +0000
Subject: note 47427 added to ref.ldap
Groups: php.notes 
Request: Send a blank email to php-notes+get-80579@lists.php.net to get a copy of this message
When using PHP on windows, and you are trying to connect (bind) to a Netware (6) LDAP server that requires secure connections (LDAPS), PHP will return a message stating that the server cannot be found. A network traffic capture of the traffic taking place on connection attempt reveals that the server supplies a certificate for use in the SSL connection, but this is rejected (***bad certificate SSLv3 packet) by the client. The reason for this is probably that the PHP LDAP implementation tries to verify the received certificate with the CA that issued the certificate. There may be a way to make it possible that this verification succeeds, but it is also possible to disable this verification by the client (which is, in this case, PHP) by creating an openldap (surprise!!) configuration file. The location of this configuration file seems to be hardcoded in the LDAP support module for windows, and you may need to manually create the following directory structure: C:\openldap\sysconf\ In the sysconf folder, create a text file named 'ldap.conf' (you can use notepad for this) and, to disable certificate verification, place the following line in the ldap.conf file: TLS_REQCERT never After this, all the normal ldap_bind calls will work, provided your supplied user id and password are correct. ---- Manual Page -- http://www.php.net/manual/en/ref.ldap.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47427 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47427&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47427&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47427&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47427&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47427&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47427&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47427&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80579) next »