Page 1 of 1

LDAP - unable to connect from home

Posted: Fri Feb 26, 2010 8:58 am
by rizjav_86
I am using Active Directory for user login, everything works perfectly fine from the server(http) and from my work computer(localhost).

But when I try to run the code from my home computer using localhost then it gives me this warning:

Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in D:\Xampp\htdocs\project\filename.php on line 34

I have already checked my php.ini file and the "extension=php_ldap.dll" is enabled.

Obviously the code is fine that's why it works on server and work computer, I am pretty sure it has something to do with my computer's security settings BTW I have tried it with my firewall OFF but still not working.

I am using windows 7 and apache server which comes with XAMPP.

Thanks !

Re: LDAP - unable to connect from home

Posted: Sat Feb 27, 2010 4:22 am
by kaisellgren
Does LDAP show up in phpinfo()?

Re: LDAP - unable to connect from home

Posted: Sat Feb 27, 2010 8:11 am
by rizjav_86
kaisellgren wrote:Does LDAP show up in phpinfo()?
no it only shows this warning: Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in D:\Xampp\htdocs\project\filename.php on line 34

and my line 34 is:

Code: Select all

$bd = ldap_bind($ad, $username, $password);
Thanks.