How to disable user Custom PHP.INI files

Disable user unwanted custom php.ini file in your cpanel server.

suPHP is a module that enhances overall server security. It forces the system to execute PHP scripts with user privileges as opposed to Web server privileges. suPHP is a good security measure especially when you expect to host multiple unrelated websites or hosting accounts.

Most of unwanted customer placed customer php.ini and used security related settings.

When you have Mod suPHP installed, you can configure your server to force the use of the main server wide php.ini file and disable the use of custom php.ini files to adjust certain php settings.

1. Login to your server as root via SSH

2. Open the following file:

vi /opt/suphp/etc/suphp.conf

3. Search for [phprc_paths] and then uncomment (remove the ; from the front) the following lines:

;application/x-httpd-php=/usr/local/lib/
;application/x-httpd-php4=/usr/local/php4/lib/
;application/x-httpd-php5=/usr/local/lib/

Save the file and  restart Apache

service httpd restart

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How To Install eAccelerator on cpanel

eAccelerator is a free, open-source piece of software used to speed up PHP loading on websites....

Test MySQL database connection with php script

You can use the following php script which is used to test mysql database connection on your...

Important php security settings

PHP is a server side scripting language. You can embed PHP code in your web pages along with...

Enable Custom php.ini for Fast CGI

With fast-cgi, custom php.ini needs to be in the cgi-bin folder. 1) Move php.ini to cgi-bin...

Powered by WHMCompleteSolution