Can't disable Register Globals warning!!

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
neilw
Forum Newbie
Posts: 2
Joined: Thu Feb 25, 2010 3:58 am

Can't disable Register Globals warning!!

Post 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...
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Can't disable Register Globals warning!!

Post 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.
neilw
Forum Newbie
Posts: 2
Joined: Thu Feb 25, 2010 3:58 am

Re: Can't disable Register Globals warning!!

Post 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!
Post Reply