You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Florent Garcin <cy...@gmx.net> on 2002/04/29 19:41:39 UTC

htaccess and $PHP_AUTH_USER

Hello!

I have installed Apache 2.0.35 and the experimental module of PHP 4.2.0.
I have also configured the apache server to make an authentification on a
directory with htaccess methode.
The htaccess works fine and checks in a htpasswd for user/password. There is
just a little problem.
When I use the variable $PHP_AUTH_USER (in a echo for exemple), nothing
appears.
I made a test.php in the protected directory. Test.php should print the
authentificated username (<? echo $PHP_AUTH_USER; ?>) but it didn't.
Anyone has an idea?

Thank you,

Flo.



---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: htaccess and $PHP_AUTH_USER

Posted by Florent Garcin <cy...@gmx.net>.
----- Original Message -----
From: "Irmund Thum" <it...@it97.dyn.dhs.org>
To: <us...@httpd.apache.org>
Sent: Tuesday, April 30, 2002 7:54 PM
Subject: Re: htaccess and $PHP_AUTH_USER


> Florent Garcin wrote:
> >
> > When I use the variable $PHP_AUTH_USER (in a echo for exemple), nothing
> > appears.
> > I made a test.php in the protected directory. Test.php should print the
> > authentificated username (<? echo $PHP_AUTH_USER; ?>) but it didn't.
> > Anyone has an idea?
> >
> since php4.2 you have to explicitly turn the global variables on

Yes, but how?

> --
> _ ___
> |  |  Irmund    Thum
> |  |
>
>
> ---------------------------------------------------------------------
> 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
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: htaccess and $PHP_AUTH_USER

Posted by Irmund Thum <it...@it97.dyn.dhs.org>.
Florent Garcin wrote:
>
> When I use the variable $PHP_AUTH_USER (in a echo for exemple), nothing
> appears.
> I made a test.php in the protected directory. Test.php should print the
> authentificated username (<? echo $PHP_AUTH_USER; ?>) but it didn't.
> Anyone has an idea?
> 
since php4.2 you have to explicitly turn the global variables on

-- 
_ ___
|  |  Irmund    Thum
|  |


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org