Question

I Recently transferred a site from one hosting company to another. As soon as I changed it over I started to intermittently get an error saying:

Directive 'Register_globals' is Depreciated in PHP 5.3 and greater

Its shared hosting so i have no access to the php.ini file to turn it off. I've tried to disable it using htaccess but no luck.

If you go into cPanel and look in php configuration it says it is on, on the old server it said off. I have spoken to the hosting company and they say it is off if you look in info.php, which is half true... the local value is off and the master value is on. On the old server the master and local were both off.

The server is running PHP version 5.3.13, if anyone is interested. I'm also using the framework Laravel 3 The hosting company said also: "The one way to fix this is to disable it in php completely, but I am not sure if there are any other customer using this as that would not work for everyone on this shared hosting platform." So I guess it isn't an option to turn it off completely, which i don't see why not!

I have gone into application/config/error.php and added

'ignore' => array(E_WARNING, E_NOTICE, E_USER_NOTICE, E_DEPRECATED, E_USER_DEPRECATED)`

But this did not work at all I just graduated and this is a volunteer project, i'm literally about to pull my hair out Thank you In advance!

No correct solution

OTHER TIPS

If you go into cPanel and look in php configuration it says it is on, on the old server it said off. I have spoken to the hosting company and they say it is off if you look in info.php, which is half true... the local value is off and the master value is on. On the old server the master and local were both off.

The only way to be 100% sure - run the follow php command inside your project

<?=phpinfo();?>

It will give you a full dump of all the actual values that PHP is using.

Search for register_globals and see what the server actually thinks.

Maybe its time to swtich hosts?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top