How to change the value of a PHP setting? Print

  • 0

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 HostUpon.

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

Was this answer helpful?

« Back

["\r\n