I was always using an authentication on PHP that worked perfectly. Looks like this:
function login()
{
    header('WWW-Authenticate: Basic realm="Acceso restringido."');
    header('HTTP/1.0 401 Unauthorized');
    echo "Acceso restringido.\n";
    exit;
}
if (!isset($_SERVER['PHP_AUTH_USER'])) {
    login();
} else {
    if ($_SERVER['PHP_AUTH_USER'] == 'test' && $_SERVER['PHP_AUTH_PW'] == 'test1') {
   } else {
        login();
    }
}
However, I changed hosts to ipage.com and now I get the user/pass prompt window but it never takes the user/pass assigned. It keeps on prompting for user/pass.
I read something about CGI but did not get whether this method is not usable in PHP configured as CGI. Is there any alternative?
