MyBB Community Forums

Full Version: PHP Register Globals on or off
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello i want to know if it is best to have PHP Register Globals on or off ???
The best idea to figure this out is by creating a new file in your document root with the name "phpinfo.php", edit it and write the following
<?php
phpinfo();
?>
Upload that to your web hosting document root and open it, then look for register_globals and see what the "Local Value" is set to.
I know but my host as it so i can put it on or off so i want to know if i should have it on or off??
Off. Otherwise you'll be very susceptible to hacking via uninitialized variables, although MyBB already takes care of it for you
So should i put it as off that will not stuff up other things will it?
Yes; your best bet is to leave it at off to avoid problems.
MyBB will work with either register globals on or off. We recommend that you leave it off (it should be off by default anyway). However, some other PHP scripts may require register globals to be on but this is getting rarer and rarer.
DennisTT Wrote:MyBB will work with either register globals on or off. We recommend that you leave it off (it should be off by default anyway). However, some other PHP scripts may require register globals to be on but this is getting rarer and rarer.

because it's such a security risk these days. PHP 6 will not work if that variable is set to On, so it's best to get ahead of the game and just keep it off for now
Tikitiki Wrote:
DennisTT Wrote:MyBB will work with either register globals on or off. We recommend that you leave it off (it should be off by default anyway). However, some other PHP scripts may require register globals to be on but this is getting rarer and rarer.

because it's such a security risk these days. PHP 6 will not work if that variable is set to On, so it's best to get ahead of the game and just keep it off for now

Well DennisTT my host as it on by default. But i have set it as off. Smile
I'd sure like to give an introduction course to your host in "Security"