Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP LDAP connection 1

Status
Not open for further replies.

BettyJo50

Technical User
Apr 25, 2002
47
0
0
US
Hi,

I am trying to just make an LDAP connection using PHP script. Can anyone please help me? This is the code I am trying.

<?php

$ldaphost = ldap_connect(&quot;11.123.1.56&quot;);
$ldapconn = ldap_connect( $ldaphost )
or die( &quot;Could not connect {$ldaphost}&quot; );


?>

Thank you for your help!!!
 
do you need to connect twice with the same function ???


this can also be rewritten as
$ldaphost = ldap_connect(&quot;11.123.1.56&quot;);
$ldapconn = ldap_connect(ldap_connect(&quot;11.123.1.56&quot;))
or die( &quot;Could not connect {$ldaphost}&quot; );

??

this looks more logic to me to try
$ldapconn = ldap_connect(&quot;11.123.1.56&quot;)
or die( &quot;Could not connect&quot; );

 
Oh, no. I do not need to connect twice.

Thank you for your help!!
 
May I ask another question? Is there something else I need to make the ldap connection? I only get a blank screen.

Thank you!!!
 
Nothing at the moment. I get a blank screen. I was just trying to see if I could even get a connection. Is there a way to test that? (As you can tell, I'm new to this...sorry!)

Thanks!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top