LDAP - unable to connect from home

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
rizjav_86
Forum Newbie
Posts: 16
Joined: Wed Feb 24, 2010 10:09 am

LDAP - unable to connect from home

Post 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 !
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: LDAP - unable to connect from home

Post by kaisellgren »

Does LDAP show up in phpinfo()?
rizjav_86
Forum Newbie
Posts: 16
Joined: Wed Feb 24, 2010 10:09 am

Re: LDAP - unable to connect from home

Post 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.
Post Reply