Bug #1726: problems with .htaccess and $php_auth_pw

From: Date: Fri, 16 Jul 1999 08:53:22 +0000
Subject: Bug #1726: problems with .htaccess and $php_auth_pw
Groups: php.dev 
Request: Send a blank email to php-dev+get-8571@lists.php.net to get a copy of this message
From: zeep@jep.de Operating system: solaris PHP version: 3.0.11 PHP Bug Type: Other Bug description: problems with .htaccess and $php_auth_pw 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.

« previous php.dev (#8571) next »