httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] custom error messages are not working right
Date Mon, 07 Apr 2003 18:13:27 GMT

On Mon, 7 Apr 2003, Prince wrote:

> wen trying this for a setup:
> in my authorization file i have:
> <?php
> (header("www-authenticate: basic realm='login'");
> header("http/1.0 401 Unauthorized");
> echo "error loging in";
> exit;
> //more code here but not tied to login/error problems
> ?>

I've never done this myself in php, but I think you are a little confused:
you seem to be under the impression that this is an nph script.  It is
not.  Apache is resonsible for generating the HTTP header, etc.  You
should just be sending
Status: 401 Unauthorized

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message