Dev License: This installation of WHMCS is running under a Development License and is not authorized to be used for production use. Please report any cases of abuse to abuse@whmcs.com

Disallowing php.ini override in suPHP Print

  • 118

Its very simple to enable this function in server using suPHP. Just by enabling phprc_paths in /opt/suphp/etc/suphp.conf will do the work for you. See the steps below:

 

vi /opt/suphp/etc/suphp.conf


Find the code below and press I to insert text.

[phprc_paths]
;Uncommenting these will force all requests to that handler to use the php.ini
;in the specified directory regardless of suPHP_ConfigPath settings.
;application/x-httpd-php=/usr/local/lib/
;application/x-httpd-php4=/usr/local/php4/lib/
;application/x-httpd-php5=/usr/local/lib/


Remove (;) from the last three lines ie.

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


Now press ESCAPE button and enter :wq to save the file.

Restart Apache

/sbin/service httpd restart


Now Users wont be able to override your default php.ini file.

 


Was this answer helpful?

« Back