Basic Authentication
Hmmm, I run a website on a Fedora PHP-able website (not hosted by myself).
I always used PHP-Basic Authentication but all of a sudden it keeps popping up (as when it does when one enters an incorrect username/password). I have not worked on the PHP/HTML code in between so I think it might be some setting on the Fedora PHP-webserver (i think it uses Apache). Any ideas what this might be befor I start cursing at my admin? My (crappy) code stated below: function auth() { if (!isset($_SERVER['PHP_AUTH_USER'])) { Header("WWW-Authenticate: Basic realm=\"ArmFN public site\""); Header("HTTP/1.0 401 Unauthorized"); echo "Pressed cancel"; exit(); } else { if (login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) { // echo "correct login"; } else { echo "No valid usercode/password combination etc."; exit(); } } } |
All times are GMT -5. The time now is 03:39 PM. |