You are here: Re: Logins no longer working - $PHP_AUTH_USER and $PHP_AUTH_PW problem? « All PHP « IT news, forums, messages
Re: Logins no longer working - $PHP_AUTH_USER and $PHP_AUTH_PW problem?

Posted by Rocky on 02/25/06 08:02

In article <eQQLf.168589$5o2.151653@fe06.news.easynews.com>,
lashooter@hotmail.com says...
> I have a site that is no longer working since moving to a new server. It
> looks like globals are not on, which is apparently needed on this particular
> site. I have an authorization script that starts as below, but keeps
> continually asking people to log in over and over again, even after they (or
> I) enter a valid username/password from the mySQL database. This WAS working
> just fine on my old server, which had globals ON. Without having globals,
> how can I make this work???
>
> Thanks,
> Wm
>
>
>
> $auth = false; // Assume user is not authenticated
> if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) {
> // Connect to MySQL
> etc...
>

It's better with register_globals off, security-wise.
Try ...
$auth = false; // Assume user is not authenticated
if (isset( $_SERVER['PHP_AUTH_USER'] ) && isset($_SERVER
['PHP_AUTH_PW'])) {
// Connect to MySQL
etc...

Read up at <URL:
http://uk.php.net/manual/en/language.variables.predefined.php >

 

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

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