PHP configurations, .htaccess, php.ini, and more...

Please note... the following settings and suPHP only applies to PHP v5 (our system default).

Since our shared hosting systems utilize suPHP for a more secure environment any user who is using php_flag directives in their .htaccess files must remove these php_flag directives.

Instead you will want to create a php.ini within your /home/USERNAME/public_html/ folder and add the directive to there.

OLD .htaccess File Settings...

php_flag register_globals off
php_flag servertokens_prod off
php_flag expose_php off

NEW php.ini File Settings...

register_globals = 0;
expose_php = 0;
servertokens_prod = 0;

If you want these php settings to be inherited through all folders within your site you can add the following to your .htaccess file that is held within the main /public_html/ folder within your account.

suPHP_ConfigPath /home/USERNAME/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>

**You can also just copy over the main system configuration from /usr/local/lib/php.ini within SSH and then make any changes that you would like...



Was this answer helpful?

Add to Favourites
Print this Article

Powered by WHMCompleteSolution