Hi all,
quite a few weeks after moving to a new server, I realized that I am no longer able to access $SERVER['PHP_AUTH_USER'] and $SERVER['PHP_AUTH_PW']. I think I should have tested the relevant scripts right after moving, however I am not 100% positive that I really did.
Even the simplest examples like
if (!isset($_SERVER['PHP_AUTH_USER'])){
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
exit;
} else {
echo "Hello {$_SERVER['PHP_AUTH_USER']}.";
echo "You entered {$_SERVER['PHP_AUTH_PW']} as your password.";
}
fail.
I am aware that these variables will not be available when running PHP as CGI process, but I am almost sure that it is running as apache module.
First question now: Are there ways to verify how PHP is installed other than phpinfo() (which the admin disabled for security reasons) or asking him (which I would not want to do unless it is my only choice)? I have very limited access to the files on the server, seems like I am locked away from configuration files like httpd.conf.
Thank you for any pointers,
m