I'm "TRYING" to install navphp4 for a client, and I would like to password protect it using the built in authentication system. It's just not working though and I can't find any documentation on the script out there at all.

Here are the variables it's pulling in for the authentication function:

PHP Code:
$homedir "./";    
# Default directory.

$user "admin";
# login username

$passwd "admin";
# Login password
$restrict_to_home false;    
# Restrict access to home folder and below.
$enable_login true;        
# Caution!! 'false' means everyone have access to your files! 
And the actual function itself:

PHP Code:
function authenticate()
  if ((
$_SERVER['PHP_AUTH_USER']!=$user||$_SERVER['PHP_AUTH_PW']!=$passwd)&&$enable_login) {
header('WWW-Authenticate: Basic realm="PHP Navigator"');
header('HTTP/1.0 401 Unauthorized');
"<h2>You are not authorised to view this file!</h2>";
The problem I suppose is that $_SERVER['PHP_AUTH_USER'] isn't available in the PHP version on their server - what's a good alternative that I can keep tied down to just this one function --- don't want to rewrite the whole script.