SuPHP directive for php.ini on shared servers

SuPHP (Single user PHP) is a php handler, which executes PHP scripts with the permissions of their owners. It is installed on all our shared servers. Using this option, you can make settings from the chosen “php.ini” file global for the entire account.

 

If “php.ini” is located in public_html folder, to enable it globally for the hosting account you should add the following configuration directive to .htaccess file:

 

<IfModule mod_suphp.c>
suPHP_ConfigPath /home/USER/public_html
</IfModule>

 

where USER is your cPanel username (hereinafter we will use “nctest” as user).

This option tells mod_suphp which path to pass on to the PHP-interpreter and which folder to execute “php.ini” from.


Click on "Save Changes"


If you have no “.htaccess” you can simply create it by clicking on “New File”.


Enter “.htaccess” in “New File Name” field.


In case “php.ini” is located in the subfolder, we will use “folder1” here, this line should be edited as follows:

<IfModule mod_suphp.c>
suPHP_ConfigPath /home/USER/public_html/folder1
</IfModule>


Click on "Save Changes"

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How to check PHP version and configuration

Phpinfo() function is commonly used to check the current state of PHP configuration. It can also...

How to use PHP Selector

In some cases correct functioning of your website depends on PHP version installed on the...

How to switch PHP version on shared servers

Our shared servers are set up to allow each customer to choose the PHP version to use for the...

How to switch PHP version on business servers

Our business servers are running with FSGI module and have PHP 5.2, 5.3, 5.4, 5.5 versions...

How to edit php.ini on shared servers

The php.ini file is the default configuration file for running applications that require PHP. It...

Powered by WHMCompleteSolution