|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-07-18 20:19 UTC] sas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 04:00:01 2025 UTC |
I found a problem with .htaccess and PHP authentication via realms. If I use the following .htaccess file (which only sends a http-authentication request if you are not accessing via the LAN) the PHP-authentication does not work anymore. [.htaccess] deny from all allow from 192.168. AuthType Basic AuthName "Pax" AuthUserFile /opt/apache/htpasswd AuthGroupFile /opt/apache/groups require valid-user satisfy any the php-source should looks like this: [test.php3] if (($PHP_AUTH_USER!="blabla") || ($PHP_AUTH_PW)!="blabla")) { Header("WWW-Authenticate: Basic realm=\"Publish\""); Header("HTTP/1.0 401 Unauthorized"); echo "please enter the password!"; exit; } But the $PHP_AUTH_* variables are always empty! I think this is a problem with apache, but I am looking forward to read your opinion on this problem.