RE: User authentication problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> What do mean with "wont work"? Does the if expression
> allway evaluate to false, or what?
> 
Indeed. 3 attempts and I'm out. On exiting, the 2 variables still contain empty 
strings.

> By the way, you might like to check out:
> 
> http://nl.php.net/manual/en/security.registerglobals.php
> 
I don't think it's anything to do with the register_globals setting. The code is 
written for a setting of "Off" by default and therefore should work either way. 
The strange thing is that it works on my other websites that have the same file 
and filesystem structure and are uploaded on the same ISP, so the PHP settings 
are identical.

Now, after having exhausted pretty much all sane alternatives (and some quite 
insane ones), I have a very irritating feeling that this problem might be 
connected to the fact that the problematic website is a .gr, while the others 
have always been .com's, .net's etc. Any experience with such problems?

It it turns out to be that, I'll let everybody know.

> -----Original Message-----
> 
> I've always utilized basic user authentication by including the
> following code in  my protected files:
> 
if ($_SERVER['PHP_AUTH_USER']!='name' || $_SERVER['PHP_AUTH_PW']!='password')
{
	header("WWW-Authenticate: Basic realm=\"Website administration\"");
	header("HTTP/1.0 401 Unauthorised");
	exit;
}
> 
> Now, suddenly this code won't work on WinXP on any browser, under Apache
> 1.3 with PHP 4.3.3 running as a module. The worst part is that it won't run
> on my ISP either, which runs PHP 4.3.4 on Linux machines. What really
> baffles me is that the same code snippet on my earlier websites runs
> perfectly. It's just the last  one I'm making it won't run on, although I
> upload exactly the same file that runs  on the others.
> 
> It sounds like something very very obvious is wrong, which makes me feel
> very very silly for not seeing it. Can it be affected by the structure of
> the rest of  the website? Any suggestions?
> 



Symeon Charalabides (cosmopolite trainee)
-------------------------------------------------
Rm 305, IT dept., NUI Galway, Ireland.
+353 91 524411 x3180

http://geminga.it.nuigalway.ie/~symeon/

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux