RE: [PHP] Forcing htaccess login again

From: Date: Tue, 27 Feb 2001 00:03:33 +0000
Subject: RE: [PHP] Forcing htaccess login again
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41765@lists.php.net to get a copy of this message
At 12:26 AM 27/02/2001, Sander Pilon wrote:
The request for a password is usually generated by a 401 header. Just do this - Header("WWW-authenticate: basic realm=\"Some realm\""); Header("HTTP/1.1 401 Unauthorized"); exit; That should pop up a box. Just make sure you check the values of $PHP_AUTH_USER/PW first before presenting those headers.
I have tried this, and all it keeps doing is reasking for the U/P until the 3rd time and errors me out. I checked the $PHP_AUTH_USER/PW and both display my own username and password, but when I enable the above lines it just keeps asking for a u/p where does the above try and verify the password from ? The initial .htaccess request authenticates from a htpasswd file held in the root dir of the user on the server. How can I make the above lines read from this htpasswd file to authenticate a new user/pass ? Chris

« previous php.general (#41765) next »