|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-15 13:10 UTC] hubweb at hotmail dot com
-- Some days ago... In my configuration file, I had : AddType application/x-httpd-php .php .php3 .php4 .phtml Every PHP page worked perfectly, but when I tried to open protected directories, I had no authentication window, only a 401 error. Presently, I have : AddType application/x-httpd-php .php3 Every PHP (.php3) page works perfectly and authentications are ok. So, why with more than one extension for php I have authentication problems ?? -- Yesterday... I tried another time the protected folder and now, if any extension is associated with the PHP module, I get a 401 error, no prompt window. LoadModule php4_module modules/php4apache2.dll AddType application/x-httpd-php .php3 => 401 LoadModule php4_module modules/php4apache2.dll <Files *.php*> SetOutputFilter PHP SetInputFilter PHP </Files> => 401 LoadModule php4_module modules/php4apache2.dll #AddType application/x-httpd-php .php3 => Authentication is ok LoadModule php4_module modules/php4apache2.dll #<Files *.php*> #SetOutputFilter PHP #SetInputFilter PHP #</Files> => Authenticatio is ok I really really really don't understand ! (This problem occured on Apache 2.0.36 and 2.0.39, the only two version of Apache 2 I installed) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 02:00:01 2025 UTC |
I've noticed the same since PHP4.2.1 and it still happens with PHP4.2.2. First I thought this was an Apache2-issue, but it ain't (Win32-Env btw). Using static .htm(l)-> auth ok using text-output for 401->auth ok using .php(3|4) ->leads directly to 401-Page it really seems like the php-parser is overriding some apache2-parts, which checks for ht-files. Trying to force the correct header <? if(!isset($PHP_AUTH_USER)) { header("WWW-Authenticate: Basic realm=\"secured\""); header("HTTP/1.0 401 Unauthorized"); (X) header("Location: error.php"); exit;} else { echo "works"; }?> doesnt work either, when the (X)-marked Line contains a php-file. Again the PHP-Parser processes the scripts without Apache2 interpreting any ht-file.