I'm working on a website for what will eventually be free
PHP/MySQL/Apache/DNS/etc hosting (see: http://hosting.venura.net , no
requests for accounts will be entertained right now), and am having problems
trying to get HTTP Authentication working. I had it working a month or so
ago, but then I put the project on hold for awhile and came back to a mess
that wasn't -- don't know how unless I somehow broke it just before I quit
working on it.

Anyways, I'm running PHP 4.1.0 (had same problems with 4.0.6 earlier so I
know it's not some weird bug with the new version), Apache 1.3.22+mod_ssl
and Linux 2.4. I'm working (for now) with a small test script containing
this (and running on SSL, which I had no problems with earlier.)


header("HTTP/1.0 401 Unauthorized");
header("WWW-Authenticate: Basic realm=\"hosting.venura.net Member Services
        . $PHP_AUTH_USER
        . ", P:"
        . $PHP_AUTH_PW
        . "\""

<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<title>[secure]venura.net :: Unauthorized</title>
<?php phpinfo(); ?>

The idea being that I can see the username/password entered in the
authentication box itself.

Anyways, though the 401 part works and actually brings up the typical "Enter
Username/Password" box, $PHP_AUTH_USER and $PHP_AUTH_PW are not being set.
There are no .htaccess files in the directory (or any parent dirs for that
matter), and no AuthType directives all in my httpd.conf file. I have been
unsuccessful in determining what is wrong, and am flat out of ideas.

My php.ini and httpd.conf files are available at

Any ideas?

-- Daniel Grace

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to