Does PHP5 treat $_SERVER['PHP_AUTH_USER']) differently? [message #177659] |
Thu, 12 April 2012 14:31 |
Marc Fenner
Messages: 1 Registered: April 2012
Karma: 0
|
Junior Member |
|
|
Hi guys,
I was working on an old script last night, which was partly written by a friend.
It seems he used these variables:
$_SERVER['PHP_AUTH_USER'])
$_SERVER['PHP_AUTH_PW'])
However, these variables used to be empty when running on PHP4, so I had to adapt the script a little which worked pretty fine. Moving to PHP5, I suddenly see values in these variables after performing the usual HTTP AUTH.
It now seems I have to undo my adaptions to make the script work.
Did they change anything about these variables from PHP4 to PHP5? I cannot find any good documentation on that change (as it appears to be)..
Thank you for any ideas!
Marc
|
|
|
Re: Does PHP5 treat $_SERVER['PHP_AUTH_USER']) differently? [message #177662 is a reply to message #177659] |
Thu, 12 April 2012 14:56 |
Captain Paralytic
Messages: 204 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On Apr 12, 3:31 pm, Marc Fenner <fenne...@hotmail.com> wrote:
> Hi guys,
>
> I was working on an old script last night, which was partly written by a friend.
> It seems he used these variables:
> $_SERVER['PHP_AUTH_USER'])
> $_SERVER['PHP_AUTH_PW'])
>
> However, these variables used to be empty when running on PHP4, so I had to adapt the script a little which worked pretty fine. Moving to PHP5, I suddenly see values in these variables after performing the usual HTTP AUTH.
>
> It now seems I have to undo my adaptions to make the script work.
Surely your adaptations must have relied on something other than these
2 variables (since they were empty) and so there would seem to be no
reason (from what you have posted) why you could not continue to use
your adaptations and have the script working.
|
|
|
Re: Does PHP5 treat $_SERVER['PHP_AUTH_USER']) differently? [message #177664 is a reply to message #177659] |
Thu, 12 April 2012 16:36 |
Thomas Mlynarczyk
Messages: 131 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
Marc Fenner schrieb:
> $_SERVER['PHP_AUTH_USER'])
> $_SERVER['PHP_AUTH_PW'])
> However, these variables used to be empty when running on PHP4, so I had to adapt the script a little which worked pretty fine. Moving to PHP5, I suddenly see values in these variables after performing the usual HTTP AUTH.
I think these variables are only available when PHP is running as a
module, but not when it's running as (Fast)CGI. Maybe that's why they
didn't work before and do now.
Greetings,
Thomas
--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)
|
|
|