note 124602 added to function.ldap-set-option

From: Date: Sat, 11 Jan 2020 21:31:21 +0000
Subject: note 124602 added to function.ldap-set-option
Groups: php.notes 
Request: Send a blank email to php-notes+get-213842@lists.php.net to get a copy of this message
PHP 7.1 added support for configuring the LDAP CA/Cert environment directly, rather than relying on the environment variables. I noticed that a lot of people are having trouble getting this to work. The correct way is: $ds=ldap_connect("ldap.google.com"); ldap_set_option(NULL, LDAP_OPT_X_TLS_CERTFILE, "/path/file.crt"); ldap_set_option(NULL, LDAP_OPT_X_TLS_KEYFILE, "/path/file.key"); ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); ldap_start_tls($ds); ... ldap_close($ds); ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.195 (proxied: 89.220.242.30) ---- Manual Page -- http://php.net/manual/en/function.ldap-set-option.php Edit -- https://master.php.net/note/edit/124602 Del: integrated -- https://master.php.net/note/delete/124602/integrated Del: useless -- https://master.php.net/note/delete/124602/useless Del: bad code -- https://master.php.net/note/delete/124602/bad+code Del: spam -- https://master.php.net/note/delete/124602/spam Del: non-english -- https://master.php.net/note/delete/124602/non-english Del: in docs -- https://master.php.net/note/delete/124602/in+docs Del: other reasons-- https://master.php.net/note/delete/124602 Reject -- https://master.php.net/note/reject/124602 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#213842) next »