Connection error expected but ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Code below from the manual. I changed $ldaphost to some fictitious name.
When I ran the script, I always get the message "Connection was successful
!" Why didn't the script bomb and give the could not connect message?

<?php

// LDAP variables
$ldaphost = "ldap.noname.com";  // your ldap servers
$ldapport = 389;                 // your ldap server's port number

// Connecting to LDAP
$ldapconn = ldap_connect($ldaphost, $ldapport)
          or die("Could not connect to $ldaphost");


print "Connection was successful !";


?>

TIA.

--
al

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux