Custom php.ini not working on SuExec Enabled Server

Table of Contents

How to enable Custom php.ini on SuExec Enabled Server ?

Ans :

Normally, on SuExec Enabled Server, you can create php.ini in your account to customize php settings for your account. If php.ini is created under an account with customize php setting and it doesn’t work for you, then this is because override is disabled in /opt/suphp/etc/suphp.conf

Quote:

[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/

This forces suphp to use the php.ini from /usr/local/lib/
You can comment these lines and then restart Apache to resolve the issue.

Quote:

[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/

Done


Custom php.ini not working on SuExec Enabled Server, Hostripples Web Hosting
Vishwajit Kale
Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostripples, a company that aims to provide affordable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.