[edit - snip it all away]
Trying something different:
I'm now protecting a directory via .htaccess and using apache to do the authentication.
Technomancer 2008.05.05, 03:53PM — PHP_AUTH_USER: authenticating a user in php5
Technomancer 2008.05.05, 05:09PM —
Ok - so its probably because the register_global_variabls in the .ini file is set to off.
Anyone know a way around this? I'm working on a shared server so don't have any control over this parameter.
polymorph 2008.05.06, 08:22AM —
I think I missed the start of the post, but you can probably still use $_SERVER['REMOTE_USER'];
Technomancer 2008.05.06, 08:35AM —
Yep - that's the one thanks.
And yeah - I edited out all the dross that was causing me grief yesterday. I found that hosting company had put mcuh of the functionality I was trying to build in place already, so I was just re-inventing the wheel.
DontBogartMe 2008.05.06, 10:00AM —
Originally posted by: Technomancer
Ok - so its probably because the register_global_variabls in the .ini file is set to off.
just a note for the future mate, if you ever come up against something like this again and think that all would be ok if you could only just turn on register_global_vars - DON'T DO IT! It's the devil, a security nightmare, one of the worst features of PHP.
Technomancer 2008.05.06, 10:28AM —
Thanks DBM - reading around the subject yesterday I understand why it was done and why it now defaults to Off.
first
