I copy-paste the code from the PHP manual for HTTP authentication as follows :
1
2 <?php
3 if(!isset($PHP_AUTH_USER)) {
4 Header("WWW-Authenticate: Basic realm=\"My Realm\"");
5 Header("HTTP/1.0 401 Unauthorized");
6 echo "Text to send if user hits Cancel button\n";
7 exit;
8 } else {
9 echo "Hello $PHP_AUTH_USER.<P>";
10 echo "You entered $PHP_AUTH_PW as your password.<P>";
11 }
12 ?>
13
This promptly generates a 500 Internal Server Error, both on a Win32 server and a Linux server... What oh What am I doing wrong here? So even copy-paste doesn't work eh? =/