Page 1 of 1

Directive 'register_globals' is deprecated PHP 5.3

Posted: Wed Jul 08, 2009 5:42 am
by gdo198
Hi

I have rather frustratingly had to upgrade my version of PHP to 5.3 on a server that runs legacy sites. I have successfully managed to get this up and running however I have one small problem that won't go away. I am consistantly getting the following error.

"PHP Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0 "

I have enabled in register_globals in my PHP.INI file because i have numerous sites that we're developed many years ago which make use of Global Variables.

Would anyone be able to suggest a way that I can hide that damn message, I am at my wits end.

Thanks in advance, Gareth.

Re: Directive 'register_globals' is deprecated PHP 5.3

Posted: Fri Jul 10, 2009 5:49 pm
by Minty
Maybe set error reporting to "E_ALL ~E_WARNING"? Not sure if that's the right syntax though, but something similar. (E_ALL less E_WARNING in bitwise).

Re: Directive 'register_globals' is deprecated PHP 5.3

Posted: Fri Jul 10, 2009 8:30 pm
by jackpf
You should update your code. You'll get hacked to sh|t with register globals turned on.

Re: Directive 'register_globals' is deprecated PHP 5.3

Posted: Fri Jul 10, 2009 9:42 pm
by Christopher
gdo198 wrote:"PHP Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0 "
HUZZZAAAAAHHHH! :drunk:

Re: Directive 'register_globals' is deprecated PHP 5.3

Posted: Sat Jul 11, 2009 8:31 pm
by Weirdan
Minty wrote:Maybe set error reporting to "E_ALL ~E_WARNING"?
php 5.3 has a new constant for this: E_DEPRECATED. So it should read E_ALL&~E_DEPRECATED