Can not connect to LDAPS server from PHP 5.5.4 on Windows 7 64bit, Apache 2.4 -
i can not connect ldaps server (3rd party) php (php 5.5.4, apache 2.4, windows 7 64bit). when i'm trying ldap_bind()
function userdn , password, receive - unable bind server: can't contact ldap server.
i have self-signed certificate ldaps server, don't know put pem file (base64) or conf.file (i have read many answers this, nothing works me - e.g. c:\openldap\sysconf\ldap.conf
, tls_reqcert
never etc.).
development folder d:\webdev
inside \www
folder projects , \binaries
folder \apache
folder , \php
folder. php module apache , apache started httpd.exe --standalone --console
.
openssl s_client -connect xxxx -cafile xxxx
ldaps server works good, return code 0
. without -cafile
fet code 19 (self-signed certificate in certificate chain)
.
ldap without ssl works fine me, i've tried free online ldap test server.
the problem solved. notice: there no openldap installation on machine.
solution set windows system variable ldapconf, value e.g. c:\users\user\.ldaprc
, in file .ldaprc
set path certificate e.g. tls_cacert c:\users\user\.ssh\ldap-ca.pem
or tls_reqcert never
, both working.
then connection script console or via apache browser running ok.
the default search path conf c:\users\user\, browser app running via apache must set system variable ldapconf.
i hope !
Comments
Post a Comment