note 68684 added to function.ldap-start-tls
| From: | on at cs dot ait dot ac dot th | Date: | Mon, 07 Aug 2006 07:00:18 +0000 |
| Subject: | note 68684 added to function.ldap-start-tls | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115604@lists.php.net to get a copy of this message | ||
More on TLS start.
It seems that either you ldap_connect to ldaps://, port 636 or you ldap_tls_start.
In my case, using ldaps on port 636 (to be sure I enforce TLS) the connection will go like:
$LDAP_SERVER="ldaps://ldap.../";
$LDAP_PORT=636;
$ds = ldap_connect($LDAP_SERVER,$LDAP_PORT);
if ($ds) {
if (!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) {
fatal_error("Failed to set LDAP Protocol version to 3, TLS not supported.");
}
/*** NO NEED ***
* if (!ldap_start_tls($ds)) {
* exit;
* }
***/
// now we need to bind anonymously to the ldap server
$bth = ldap_bind($ds);
//make your query
----
Server IP: 64.71.164.2
Probable Submitter: 192.41.170.57
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.ldap-start-tls.php
Edit -- https://master.php.net/note/edit/68684
Del: integrated -- https://master.php.net/note/delete/68684/integrated
Del: useless -- https://master.php.net/note/delete/68684/useless
Del: bad code -- https://master.php.net/note/delete/68684/bad+code
Del: spam -- https://master.php.net/note/delete/68684/spam
Del: non-english -- https://master.php.net/note/delete/68684/non-english
Del: in docs -- https://master.php.net/note/delete/68684/in+docs
Del: other reasons-- https://master.php.net/note/delete/68684
Reject -- https://master.php.net/note/reject/68684
Search -- https://master.php.net/manage/user-notes.php