Re: HTTP AUTHENTICATION and LOGOUT Problem

From: Date: Sat, 01 Jul 2000 22:21:35 +0000
Subject: Re: HTTP AUTHENTICATION and LOGOUT Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4310@lists.php.net to get a copy of this message
In article <39588B5D.8A7B10DB@inteltec.it>, inmaer@inteltec.it (Ermelindo Mauriello) wrote: > I've wrote an application using mod_auth_ldap for authentication with > apache. > > I need to put a Logout button to exit from the application and return to > a > non-protected index file. > > I've done something like that: > <? > if ($REMOTE_USER==$user) { > Header( "WWW-authenticate: basic realm=\"S.C.T.R. - > Utente\""); > Header("HTTP/1.0 401 Unauthorized"); > ?><script > language="javascript">document.location='../'; I could be totally off-base here, but I don't think you can have mod_auth_ldap and PHP both sending these authentication headers... It's like trying to mix-and-match who's doing what, and it probably will fail. If you're using mod_auth_ldap, you'll have to configure mod_auth_ldap to do what you want... You could convert to have PHP handling all the authentication and querying the LDAP server... (Assuming you are using PHP as Module, and not as CGI -- PHP as CGI can't do authentication internally.) -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#4310) next »