Knowledge Base Article
You can apply custom PHP settings on a per-folder basis using a local php.ini file.
For example, you need register_globals set to Off in a directory. For this purpose you should log in your cPanel and go to the File Manager. There navigate to the directory where you'd like this setting applied. In this directory create a file php.ini containing:
register_globals = off
Naturally, if you'd like register_globals turned on you should specify:
register_globals = on
The above works perfectly fine with most web hosting companies, including Siteground.
However, there are two exceptions:
- some important PHP limits cannot be changed, for example memory_limit and max_execution_timeout. Setting different values than the administratively assigned will endanger the overall shared server performance.
- PHP might be compiled as an Apache module. In this case try using a .htaccess file containing:
php_value name value
For example, if you'd like to turn off register_globals you have to specify:
php_value register_globals off
Please note that you cannot change global PHP settings with a local php.ini file if you are using PHP 5.1.
If you want to be able to use different PHP settings and PHP versions on a per-folder basis, you can sign up for a hosting account at SiteGround. We offer the best PHP hosting and our support team is ready to assist you with any PHP questions/problems you may have.
Rating
|

