How to change a php.ini value?

We use suPHP in all of our servers. This is the common reason why php_flag or php_value doesn't work on MH servers. To change a value like "register_globals" or other you need to use a custom php.ini file put in the public_html folder. Suppose, if you want to change the value of register_globals using a custom php.ini file, just put the following inside a php.ini file created on your public_html folder:

register_globals = On

It should set your register_globals value to On, If you want to set the value to Off, use the following:

register_globals = Off

Use the same settings for all available php.ini values to be configurable by users.

After you are done with setting up php.ini file, you need to set the suPHP configpath so that all other subdirectories in your public_html takes that php.ini as its default configuration file. To do this put the following line in your .htaccess:

suPHP_ConfigPath /home/username/public_html

You need to change two things to correct values from your account settings. Username set at the above configuration is your cpanel username. You also need to find what home directory you are on, if it is /home, you do not need to do any changes above, but if it is /home2 or /home3 etc, you need to change with correct values. This settings can be found in your file manager or Go to Cpanel and from the left menu find out the path to your "Root Directory" or "WWW Directory" or "Home Directory".

Thats it, you should be all ON :)

  • 5 Uživatelům pomohlo
Byla tato odpověď nápomocná?