Re: [PHP] new security patch problem

2005-05-13 Thread Richard Lynch
On Fri, May 13, 2005 9:49 am, K.S. TANG said:
> Thanks you, There is no ['PHP_AUTH_USER'] nor ['PHP_AUTH_PW'] in var_dum()
> I've asked the server administrator, He said he has installed a php
> security
> patch two days ago.
>
> Could anyone tell me how to config the php server so that
> ['PHP_AUTH_USER']
> and ['PHP_AUTH_PW'] can be access or avaliable to me and the web browser
> 

Those don't really come from PHP...

The browser sends them.

The web server passes them on to PHP.

PHP pretty much just gives you what it gets.

If PHP ain't getting them, the web server isn't giving them (or the
browser isn't sending them, which is quite unlikely in modern GUI
browsers.)

You'll have to get your admin to examine web server settings.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] new security patch problem

2005-05-13 Thread K.S. TANG
Thanks you, There is no ['PHP_AUTH_USER'] nor ['PHP_AUTH_PW'] in var_dum()
I've asked the server administrator, He said he has installed a php security 
patch two days ago.

Could anyone tell me how to config the php server so that ['PHP_AUTH_USER'] 
and ['PHP_AUTH_PW'] can be access or avaliable to me and the web browser 


Thanks a lot
K.S.

"Richard Lynch" <[EMAIL PROTECTED]> 
???:[EMAIL PROTECTED]
> On Thu, May 12, 2005 9:27 am, K.S. TANG said:
>> I have a page using the Basic HTTP Authentication and works well before.
>> But this night, the server seems to not receiving any $_SERVER pass in
>> from
>> Web browsers.
>>
>>   if ( (!isset($_SERVER['PHP_AUTH_USER'])) || ($_SERVER['PHP_AUTH_USER']
>> !=
>> "netop") || ($_SERVER['PHP_AUTH_PW'] != "cti63") ) {
>>header('WWW-Authenticate: Basic realm="Please enter User Name and
>> Password:"');
>>header('HTTP/1.0 401 Unauthorized');
>>echo 'Authentication error!!';
>
> var_dump($_SERVER);
>
>>exit;
>>   }
>>
>> I've trial to put this on another server, it doesn't work too !! (but it
>> works before also).
>>
>> I've trial to use the most simple code from php.net
>>
>>   if (!isset($_SERVER['PHP_AUTH_USER'])) {
>>header('WWW-Authenticate: Basic realm="My Realm"');
>>header('HTTP/1.0 401 Unauthorized');
>>echo 'Text to send if user hits Cancel button';
>
> var_dump($_SERVER);
>
>>exit;
>>   } else {
>>echo "Hello {$_SERVER['PHP_AUTH_USER']}.";
>>echo "You entered {$_SERVER['PHP_AUTH_PW']} as your password.";
>>   }
>>
>> But it doesn't work too. The browser ask for the user name and password
>> for
>> three times and than echo the line "Text to send if user hits..."
>>
>> Please !!! Please help me.
>> Thanks a lot.
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> -- 
> Like Music?
> http://l-i-e.com/artists.htm 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php