Directive 'register_globals' is deprecated PHP 5.3

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
gdo198
Forum Newbie
Posts: 1
Joined: Wed Jul 08, 2009 5:35 am

Directive 'register_globals' is deprecated PHP 5.3

Post 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.
Minty
Forum Newbie
Posts: 6
Joined: Sat Jun 27, 2009 7:46 pm

Re: Directive 'register_globals' is deprecated PHP 5.3

Post 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).
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Directive 'register_globals' is deprecated PHP 5.3

Post by jackpf »

You should update your code. You'll get hacked to sh|t with register globals turned on.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Directive 'register_globals' is deprecated PHP 5.3

Post by Christopher »

gdo198 wrote:"PHP Warning: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0 "
HUZZZAAAAAHHHH! :drunk:
(#10850)
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Directive 'register_globals' is deprecated PHP 5.3

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