Hi all,
I'm currently implementing a web-based LDAP admin interface (written in PHP) to our RADIUS system. In order for the LDAP admin to access the LDAP interface, they've to be first authenticated by a system (web-based login), and the system will return the LDAP server, port, bind DN and bind password to the LDAP admin interface in the $_SESSION variables. Here's my problem, hence a session has been started (the web-based login), when user got authenticated and trying to bind to the LDAP server, they always have to hit the refresh in order to get the binding works. In another words, users only see a blank page once they got authenticated, only if they hit refresh again, the LDAP data will be shown.
Someone has mentioned this problem (session_start got block if one is already running in the background) in php.net, and they suggested to use session_name() before the session_start so the system won't can't confused by the 2 simultanous running sessions. I tryed that but it didn't work.
here's my code for the web-page login,
session_start();
if(!session_is_registered('web-page-login')) {
session_register('web-page-login');
}
here's my code for the LDAP admin interface,
session_start();
if ($SESSION['web-page-login']['ldap_server']) {
$SESSION["ldap_server"] = $_SESSION['web-page-login']['ldap_server'];
<do the above statement for port, binddn and bind password>
<bind with $_SESSION["ldap_server"], $_SESSION["ldap_port"] etc.>
If anyone has any insight, please let me know. Any help will be greatly appreicated! (Sorry for the long email!)
Annie