Here's an interesting workaround, but I'd still like to know if there is a better way to do this...

if($f = fsockopen($ldap_dns_or_ip, $ldap_port, $error_no, $error_string, $timeout_in_secs)) {
fclose($f);
$ds = ldap_connect($ldap_dns_or_ip);
}


Basically, you just test out the port before attempting to connect. I wish there was something comparable to fsockopen for the ldap_connect. Again, if someone has a better way of doing this, I'd be interested.

Adam

On Monday, August 25, 2003, at 09:39 AM, Adam Ravitch wrote:

I'm working on a site written in PHP. For our login, we verify the user authentication locally before comparing it against an LDAP server. In case the LDAP server is down, we allow limited login so that the site remains functional. My question is whether or not there is a way to set the timeout for the LDAP verification via PHP. I don't have administrative access to the LDAP server, so most likely the timeout will need to be set locally on our site. Thanks in advance for your help.

Adam


____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list




____________________
BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to