Page 1 of 1

Can't disable Register Globals warning!!

Posted: Thu Feb 25, 2010 4:04 am
by neilw
Hi,

I have PHP 5.3 and legacy sites which require REGISTER GLOBALS on.

How can I stop the damn warning messages from PHP saying "PHP Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater"?

I have tried changing the error reporting value in my php.ini and nothing has worked yet.

Values I have tested:

E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_PARSE & ~E_DEPRECATED & ~E_USER_DEPRECATED

E_ERROR ^ E_NOTICE ^ E_DEPRECATED ^ E_USER_DEPRECATED

E_ALL&~E_DEPRECATED

None of them worked...

Please help!

Neil - http://www.hencam.co.uk - for when you really want to watch hens on the Internet...

Re: Can't disable Register Globals warning!!

Posted: Thu Feb 25, 2010 8:08 am
by Weirdan
neilw wrote:I have PHP 5.3 and legacy sites which require REGISTER GLOBALS on.
This warning is there for a reason - register_globals option is already removed from PHP 6 and now you have a time to fix/rewrite the sites before PHP 6 is released.

Why have you upgraded to PHP 5.3 if you're running legacy sites in the first place?
neilw wrote: How can I stop the damn warning messages from PHP saying "PHP Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater"?
You can redirect this messages to error log (log_errors php.ini directive). Well, you should be doing this on production servers anyway.

Re: Can't disable Register Globals warning!!

Posted: Fri Feb 26, 2010 6:24 am
by neilw
You're right.

5.3 came with the server (a new Centos build), so I've compiled 5.2.12, recompiled APC and everything is fine now.

We'll look at the deprecated functions and slowly attack them over the next few months so hopefully be in a position to upgrade to 6 when the time comes!