Jump to content

PHP with LDAP


dmccabe

Recommended Posts

I am wanting to try and create a php page to use an address book, this page will query our Active Directory and display the details of members of staff.

 

At this stage I should point out I am no php expert, but am following instructions from

 

http://www.developer.com/lang/php/article.php/3100951

 

and

 

http://uk.php.net/ldap

 

If I put this in:

echo "<h3>LDAP query test</h3>";
echo "Connecting ...";
putenv('LDAPTLS_REQCERT=never') or die('Failed to setup the env');
$ds=ldap_connect("lch-ad.lch.com");  // must be a valid LDAP server!
echo "connect result is " . $ds . "<br />";

 

then I get:

 

LDAP query test

Connecting ...connect result is Resource id #1

 

This is with php5 setup on my machine locally running IIS on Windows XP Pro SP

 

If I change the ldap address it makes no different to the result.

 

Any clues from anyone?

Link to comment
https://forums.phpfreaks.com/topic/85376-php-with-ldap/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.