[Chameleon] Authorization in Chameleon

Ken Sanderson ken at rockies.ca
Thu Oct 28 13:32:49 EDT 2004


I have a very similiar script that I am willing to share if you would 
like it? Scrambling at the moment to get ready for a conference call, 
but can get it to you later today.

Ken

joanvp 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
> 



More information about the Chameleon mailing list