So, I got bored one weekend and decided to recompile PHP using EasyApache, but I thought to myself, well if I am compiling a c program, why not compile it with custom GCC flags? So, here’s what I did:
This requires that you have ROOT SSH access to your cPanel server
echo "-O3" > /var/cpanel/easy/apache/rawenv/CFLAGS screen -S ea3 /scripts/easyapache --skip-cpanel-version-check --build
This will automatically rebuild the last saved EasyApache build with the new CFLAGS. If you have not built PHP with EA3, you can use:
screen -S ea3 /scripts/easyapache
This will take you through the EasyApache wizard, and once you start the build it will then use the custom flags.
Thanks to cPanel for providing this neat feature! ![]()

