You are here: Re: [PHP] WWW-Authenticate « PHP « IT news, forums, messages
Re: [PHP] WWW-Authenticate

Posted by John Taylor-Johnston on 10/23/05 02:16

Robert Cummings wrote:

>On Sat, 2005-10-22 at 18:21, John Taylor-Johnston wrote:
>
>
>>Robert Cummings wrote:
>>
>>
>>
>>>On Sat, 2005-10-22 at 17:59, John Taylor-Johnston wrote:
>>>
>>>
>>>
>>>
>>>>Does anyone see anything wrong with my code below? It works in other
>>>>files, on other servers. I copied and pasted it exactly?
>>>>It won't recognise the user name or password. Does Authenticate work on
>>>>all servers? Here is my phpinfo if that helps?!
>>>>http://www.royalarchmasonsofquebec.com/phpinfo.php
>>>>I don't get it.
>>>>John
>>>>
>>>><?php
>>>>if ( ( !isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW))
>>>> || ( $PHP_AUTH_USER != 'user' ) || ( $PHP_AUTH_PW != 'password' ) ) {
>>>>
>>>> header('WWW-Authenticate: Basic realm="Private"');
>>>> header('HTTP/1.0 401 Unauthorized');
>>>> echo 'Authorization Required.' . '<a href="' . $PHP_SELF . '">Try
>>>>again</a> or contact <a href="mailtoGSE@foo.com">GSE</a>';
>>>> exit;
>>>>
>>>>} else {
>>>>?>
>>>>in
>>>><?php
>>>>}
>>>>?>
>>>>
>>>>
>>>Check phpinfo() and let us know the value of "register_globals".
>>>
>>>
>>>
>>register_globals On On
>>
>>
>
>Sorry to have asked, just re-read the post and realized you posted a
>link to your phpinfo(). (man I'm not sleeping enough lately :/) Anyways
>viewing your phpinfo() shows that the server is in CGI mode contrary to
>the requirements listed here :(
>
> http://ca.php.net/features.http-auth
>
>Cheers,
>Rob.
>
>
Back to the drawing board. Thanks Rob!
Good grief. I know why too. They are running a client admin that needs
it that way probably.
J

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация