Bug #18359 Updated: PHP module seem to make trouble with authentication under Apache 2

From: Date: Wed, 24 Jul 2002 22:22:46 +0000
Subject: Bug #18359 Updated: PHP module seem to make trouble with authentication under Apache 2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15084@lists.php.net to get a copy of this message
ID: 18359 Updated by: digex@web.de Reported By: hubweb@hotmail.com Status: Open Bug Type: Apache2 related Operating System: Windows 2000 PHP Version: 4.2.1 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2002-07-15 13:10:06] hubweb@hotmail.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) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18359&edit=1

« previous php.bugs (#15084) next »