note 76708 added to features.http-auth
| From: | gbelyh at gmail dot com | Date: | Fri, 27 Jul 2007 06:48:49 +0000 |
| Subject: | note 76708 added to features.http-auth | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128957@lists.php.net to get a copy of this message | ||
Back to the autherisation in CGI mode. this is the full working example:
# Create the .htaccess file with following contents:
# also you can use the condition (search at this page)
RewriteEngine on
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
# In the beginning the script checking the authorization place the code:
$userpass = base64_decode(substr($_SERVER["REDIRECT_REMOTE_USER"],6)) ;
$userpass = explode(":", $userpass);
if ( count($userpass) == 2 ){
#this part work not for all.
#print_r($userpass);die; #<- this can help find out right username and password
list($name, $password) = explode(':', $userpass);
$_SERVER['PHP_AUTH_USER'] = $name;
$_SERVER['PHP_AUTH_PW'] = $password;
}
----
Server IP: 209.41.74.194
Probable Submitter: 82.209.219.211
----
Manual Page -- http://www.php.net/manual/en/features.http-auth.php
Edit -- https://master.php.net/note/edit/76708
Del: integrated -- https://master.php.net/note/delete/76708/integrated
Del: useless -- https://master.php.net/note/delete/76708/useless
Del: bad code -- https://master.php.net/note/delete/76708/bad+code
Del: spam -- https://master.php.net/note/delete/76708/spam
Del: non-english -- https://master.php.net/note/delete/76708/non-english
Del: in docs -- https://master.php.net/note/delete/76708/in+docs
Del: other reasons-- https://master.php.net/note/delete/76708
Reject -- https://master.php.net/note/reject/76708
Search -- https://master.php.net/manage/user-notes.php