You are here: Turn on $_SERVER["PHP_AUTH_USER"] locally? « PHP Programming Language « IT news, forums, messages
Turn on $_SERVER["PHP_AUTH_USER"] locally?

Posted by jerrygarciuh on 06/08/05 19:09

Hello,

I am finding that on a new server where I am developing

$_SERVER["PHP_AUTH_USER"] and
$_SERVER["PHP_AUTH_PW"]

Do not show up in $_SERVER when I when they should be defined I test
using
print_r($_SERVER) or this

<?php
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 "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your
password.</p>";
}
?>

Is there a setting that is keeping PHP from accessing this
information? Can I set this locally?

$_SERVER["REMOTE_USER"] also stays empty.

TIA for any advice!

jg

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация