Re: HTTP Authentication with safe_mode
| From: | Raul Dias | Date: | Wed, 16 Apr 2003 01:59:08 +0000 |
| Subject: | Re: HTTP Authentication with safe_mode | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144053@lists.php.net to get a copy of this message | ||
Hi again,
After digging into the sources I found out that:
1 - The correct behaviour is to just undef PHP_AUTH_USER and
PHP_AUTH_PW if safe_mode is on __AND__ if an external
(e.g. Apaches's http.conf has an AuthType directive
for a given directory).
2 - There is a bug in PHP in the way safe_mode deals with apache2.
Apache1 code is fine. Don't know about other servers.
PHP does not check for an external authentication (like AuthType),
it just denys it.
I am still not familiar with apache 2.x API yet.
Regards,
Raul Dias
Raul Dias <raul@dias.com.br> wrote:
>Hi,
>
>When safe_mode is on, $PHP_AUTH_* (if globals are on)
>and $_SERVER[PHP_AUTH*].
>
>The only other thing I find about this in the docs is
>this (in several places):
>
>----
>Note: If safe mode is enabled, the uid of the script
>is added to the realm part of the WWW-Authenticate header.
>----
>
>So, how can I do an HTTP Authentication using PHP (with no
>external authentication).
>Actually, how can I access the username and password
>in php? I thing that might be some other way.
>
>
>Nowhere in the docs or googling, I found something stating
>that it is not possible to do http authentication
>with safe_mode on.
>
>
>In the case it isn't possible to do such thing. Does
>anyone miss this feature?
>
>
>
>Regards,
>
>Raul Dias
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>