How to recompile Apache/PHP.
There are two ways available to recompile apache/php in your cpanel server. Use it if you know properly.
log into WHM and navigate to EasyApache (Apache Update)
On the main page make sure ‘Begin by selecting a profile to load:’ is selected and then click ‘Start customizing based on profile‘.
On the second page (Apache Version), we recommend upgrading to the latest available if not already selected. Then click ‘Next Step‘.
On the third page (PHP Major Version) select the version of php you want, click ‘Next step‘ if you are unsure.
On the forth page (PHP Minor version) select the version of php you want, click ‘Next step’ if you are unsure.
On the fifth page (Short options list)
select ‘Mod suPHP’ and select carefully which modules you want.
Click bottom of the page select ‘Save and Build‘.