PHP 8.5.0 Alpha 1 available for testing

Voting

: seven plus zero?
(Example: nine)

The Note You're Voting On

get_your_gun at hotmail dot com
19 years ago
Hey

I was trying this all day and final noticed that when you use bind and authenticate. The user name needs to be as follows for it to work. I am using PHP V 4.03 so this might be different now but here is what I used and the auth worked.

<?php
$ldaphost
= "ldap.what.at.greatnet.com";
$ldapport = 389;

$ds = ldap_connect($ldaphost, $ldapport)
or die(
"Could not connect to $ldaphost");

if (
$ds)
{
$username = "[email protected]";
$upasswd = "pass";

$ldapbind = ldap_bind($ds, $username, $upasswd);

if (
$ldapbind)
{print
"Congratulations! $username is authenticated.";}
else
{print
"Nice try, kid. Better luck next time!";}
}

?>

<< Back to user notes page

To Top