I've never tried requiring authentication via a header (only through 
httpd.conf or .htaccess), but here's my best guess:

You're telling it what type of authentication to do, and you're telling 
it what realm to authenticate to, but:

- You're not telling it what to require, and you're not telling it where 
to find that info.

For example, with the httpd.conf format, you would have something like:

        <Directory "/var/www/htdocs/foo">
            AuthType Basic
            AuthName "My Realm"
            AuthUserFile /var/www/auth/htpasswd
            require valid-user

Any reason you're not using .htaccess?


dssopt wrote:
> Hi everybody,
> I try to install Apache 3.1.2 + PHP-4.1.2 on RedHat 7.2.
> All seems to be fine but when I write a PHP to test the authenticate.
> <?php
>     header("WWW-Authenticate: Basic realm=\"My Realm\"");
> ?>
> Whatever I input to the login box, the failed, retry message comes out and
> it becomes a dead loop - login - retry - login ..
> Can anyone help me ??
> Ken


/---------------------------------------------=[ BILLY S HALSEY ]=--\
| Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
| "All opinions and technical advice offered in this message are my |
| own and not necessarily endorsed by my employer."                 |
\--=[ [EMAIL PROTECTED] ]=--------------------------------------------/

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to