How to restrict all accounts to the global php.ini file.
In easy apache3, to restrict all accounts to the global php.ini file, I would edit the /opt/suphp/etc/suphp.conf file and just
Uncomment these lines:
Code:
[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/
Now, since I use easyapache4 which support multi php version, the above trick does not work. Is there anyway to restrict all accounts to the global php.ini file?
Thank you.
-
Hi, If you are using handler as SuPHP on your EA4 PHP, then you can do this the same way, only the suPHP location is changed. You can find it in /etc instead of /opt.. 0 -
Ah..thank you very much for the info @24x7server . I will try it. Thank you. 0 -
Just to follow up on this thread, the path is below: # tail -13 /etc/suphp.conf ;Uncommenting these will force all requests to that handler to use the php.ini ;in the specified directory regardless of suPHP_ConfigPath settings. ;[phprc_paths], like suPHP_ConfigPath, is subject to php's PHPRC behavior. ;Before using this mechanism make sure to fully understand the implications ; of doing so: ; https://go.cpanel.net/EA4PHPHandlers#PHPHandlers-Thesuphp.conffile ; https://go.cpanel.net/PHPRC#ThecPanelPHPRCPHPPatchforEasyApache4-SuPHP ;application/x-httpd-ea-php54=/opt/cpanel/ea-php54/root/etc ;application/x-httpd-ea-php55=/opt/cpanel/ea-php55/root/etc ;application/x-httpd-ea-php56=/opt/cpanel/ea-php56/root/etc ;application/x-httpd-ea-php70=/opt/cpanel/ea-php70/root/etc ;application/x-httpd-ea-php71=/opt/cpanel/ea-php71/root/etc0 -
I got this fixed and understood how does new easyapache4 works ;p Long time never touch cpanel server configuration. Easyapache4 really new than easyapache3. You can mark this tread as solved now. Thank you. 0
Please sign in to leave a comment.
Comments
4 comments