dwessell
asked on
HTTP authentication on Apache 1.3 with php
Hi,
I've just inherited a website, and I'm not sure on how some of the code functions..
It uses this bit:
if ( isset( $_SERVER['PHP_AUTH_USER'] ) ) {
And seems to auth off of a password file in the main dir, at least so far as I can tell from reading documentation..
I'm on a Fedora machine, running Apache 1.3.. It's also a Cpanel setup (With WHM)...
In /usr/local/apache/conf/sit es I have a file called sitedomain.com.conf (Sub sitedomain for actual domain name)..
It contains information like:
<Location "/askjohn">
AuthName "Member Area"
AuthType Basic
AuthUserFile /home/domain/public_html/w fmpasswd
Require valid-user
</Location>
Can someone clue me in on what else might be misssing? When I hit the pages that should auth, nothing happens..
Thanks
David
I've just inherited a website, and I'm not sure on how some of the code functions..
It uses this bit:
if ( isset( $_SERVER['PHP_AUTH_USER'] ) ) {
And seems to auth off of a password file in the main dir, at least so far as I can tell from reading documentation..
I'm on a Fedora machine, running Apache 1.3.. It's also a Cpanel setup (With WHM)...
In /usr/local/apache/conf/sit
It contains information like:
<Location "/askjohn">
AuthName "Member Area"
AuthType Basic
AuthUserFile /home/domain/public_html/w
Require valid-user
</Location>
Can someone clue me in on what else might be misssing? When I hit the pages that should auth, nothing happens..
Thanks
David
ASKER
die(print_r($_SERVER['PHP_ AUTH_USER' ]));
Always prints 1...
Always prints 1...
ASKER
Figured it out, required a <Directory> directive in Apache's httpd.conf..
Mod's feel free to close..
Mod's feel free to close..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If I run a phpinfo, then I see that there are values there... Any suggestions?
Thanks
David