there is a simpler way to do this(in case of cPanel):
1.switch to apache, run easyapache to build php --> you've done it
2.(under apache or lsws)in cPanel lsws plugin, click "Build Matching PHP Binary", then php for lsws will be built according to all the settings in easyapache. -- right, just...