Disable php.ini overrides on cPanel suphp servers

Quags

Administrator
Staff member
If you have limits in the master php.ini file at /usr/local/lib/php.ini on a cpanel server, such as disable functions, you will also want to disable the ability for user's to put in their own php.ini file. An easy way to do this is adding the following code to /usr/local/apache/conf/includes/pre_main_global.conf

Code:
<IfModule mod_suphp.c>
<Location />
suPHP_ConfigPath /usr/local/lib/php.ini
</Location>
</IfModule>
When done restart apache with /scripts/restartsrv_httpd
 
Top