Using Apache / Windows 98 / PHP / mySQL

The following script is from Julie Meloni's book "PHP Essentials"
(PrimaTech) on page 138.

I've copied the script from her site and tried to run it and get the

Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and inform them of
the time the error occurred, and anything you might have done that may have
caused the error.

More information about this error may be available in the server error log.


Apache/1.3.12 Server at localhost Port 80

The following is the script:


    if (!isset($PHP_AUTH_USER))

        header('WWW-Authenticate: Basic realm="My Private Stuff"');
        header('HTTP/1.0 401 Unauthorized');
        echo 'Authorization Required.';

    } else

        if (($PHP_AUTH_USER == "jane") && ($PHP_AUTH_PW == "mypassword"))

            echo "<P>You have entered this username: $PHP_AUTH_USER<br>";
            echo "You have entered this password: $PHP_AUTH_PW<br>";
            echo "The authorization type is: $PHP_AUTH_TYPE.</p>";

        } else

            echo "You are not authorized!";




PHP General Mailing List (
To unsubscribe, visit:

Reply via email to