There are some occations where my LDAP server is not responding at all or fast enough. The server is still responds well to ping but not for LDAP connection. The ldap_connection hangs there forever[until my php script timeout]. I've a duplicate password database to which I wish to switch in the event of LDAP server down.
Is there any possibility to set a timeout for ldap_connect statement? So that after certain seconds without LDAP response I can switch to database for authentication?