FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Does PHP5 treat $_SERVER['PHP_AUTH_USER']) differently?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Does PHP5 treat $_SERVER['PHP_AUTH_USER']) differently? [message #177659] Thu, 12 April 2012 14:31 Go to next message
Marc Fenner is currently offline  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 Go to previous messageGo to next message
Captain Paralytic is currently offline  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 Go to previous message
Thomas Mlynarczyk is currently offline  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)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: out of sheer curiosity...
Next Topic: OOP versus Procedural/Functional
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 08:19:53 GMT 2024

Total time taken to generate the page: 0.02698 seconds