In our earlier post How to use MutiPHP INI editor to edit php.ini we learnt about editing php.ini from web host manager and the cPanel. In this post we will discuss how to edit php.ini via command line in cPanel server running easyapache 4.
On servers that run easyapache 3, we edit php.ini file which is located in
/usr/local/lib/ to make changes globally however since easyapache 4 introduced the ability to run multiple versions of php, the need for multiple php.ini files originated. The php.ini files used by multiphp are located at /opt/cpanel/ea-php$$/root/etc where $$ is the two digit php version nuber. For example, for php 5.5 php.ini files are located at /opt/cpanel/ea-php55/root/etc/php.ini. You can edit these files using your favorite editor e.g. nano however if you use suphp php handler changes you made in the file takes place instatnly however for dso handler a graceful apache restart is required.
I have made short video for it.