MyBB Community Forums

Full Version: "php_flag register_globals off" - question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi All,

My webhost no longer allows "php_flag register_globals off" in .htaccess

Support told me that I should create my own php.ini to set that flag.

So I created php.ini inside forum root folder. Is this enough? Did I create php.ini in the correct folder or do I need to create it anywhere else?

Thank you very much.
Your host told you to create your own php.ini?
Which host are you with? Are you on dedicated/shared/VPS server?
Yes that is correct. They had some issues with the way php is configured on the server so they no longer allow php flags in .htaccess

I am on shared with downtownhost.com
Uploading it to your path should do the trick,but then you need to restart apache, can you do that? You might want to ask you hosting support for more information.
Nope I can't restart apache on my own...I doubt even the host will do that on my request...maybe i need to wait until their maintenance or until the server has some issues.

Thanks for the replies.
Ok. Do they have live support? You could always ask them, or just drop in an email.
Yes they do. I will contact them.

What will happen if this value is not set or set to ON? i.e. What will be the problem on my forum until apache is restarted?

Thanks.
When on, register_globals will inject your scripts with all sorts of variables, like request variables from HTML forms. This coupled with the fact that PHP doesn't require variable initialization means writing insecure code is that much easier. It was a difficult decision, but the PHP community decided to disable this directive by default. When on, people use variables yet really don't know for sure where they come from and can only assume. Internal variables that are defined in the script itself get mixed up with request data sent by users and disabling register_globals changes this.
Just run the site as is...don't worry about the Globals imho. mybb doesn't use them anyways. If your host sucks then get a new one. Unless you are on a VPS which doesn't sound like you are...then as a hosting client you can't have your own php.ini. As far as I know there is only one php.ini when apache starts.

If you can even restart apache then you are unlikely to have access to the original php.ini.

Are you sure you are not confused? Do us a favor. Create a phpinfo page to view on your site or just post your phpinfo from admincp here. I would like to see the configuration.
Well it's not a problem with MyBB, since MyBB can work with register_globals on or off (we recommend off for security reasons).
Pages: 1 2