[Chameleon] Authorization in Chameleon

Bart van den Eijnden bartvde at xs4all.nl
Thu Oct 28 12:48:59 EDT 2004


Hi,

you can also use basic authentication on the webserver (Apache, IIS) level  
in order to do this.

For Apache do the following in your Chameleon (ms4w) application  
httpd.conf file:

<Location /nameofyourapp/*>
    Order deny,allow
    Satisfy all
    AuthType Basic
    AuthName "YourApp Authorisation Domain"
    AuthUserFile "c:\ms4w\apache\bin\yourapp.pwd"
    require valid-user
</Location>

Best regards,
Bart

On Thu, 28 Oct 2004 09:32:23 -0700 (PDT), joanvp <joanvp at yahoo.com> wrote:

> I want to insert a simple password in chameleon. As
> I'm newby in PHP, I've tried a simple script browsing
> on the net:
> ----------
> $username = "usu";
> $pwd = "password";
>
> if(!isset($PHP_AUTH_USER)) {
> Header("WWW-Authenticate: Basic realm=\"Zona
> protegida\"");
> Header("HTTP/1.0 401 Unauthorized");
> echo "Imposibile ejecutar la autorización\n";
> exit;
> } else {
> if (($PHP_AUTH_USER == $username) && ($PHP_AUTH_PW ==
> $pwd)) {
> echo "Autorización ejecutada para $username.";
> } else { echo "Autorización fracasada.";}
> }
> ----------
> I inserted it in index.phtml on chameleon application
>
> It shows a form with two inputs. But when I enter my
> username and password it doesn't work.
>
> Someone can help me?
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/


More information about the Chameleon mailing list