PDA

View Full Version : Replace Apple Bundled PHP




moonchilddave
Jul 26, 2012, 09:30 AM
I have several systems at work, and occasionally get pinged on because the Apple supplied version of PHP contains vulnerabilities. I have Xcode installed on all the machines, and would just like to simply re-compile and install the latest and greatest version of PHP over top of (removing) the Apple supplied versions. I know I could just compile a fresh version in a new location, but that leaves the old version with vulnerabilities lying around which does no good for me.

So does anyone have instructions on building and replacing the built in version of PHP? I'm not looking to add extra modules or anything else - just a basic build with the same feature set as Apple. Currently, I'm responsible for 2 MacPro's... 1 running Snow Leopard, the other running Lion.



appletechpro
Jul 26, 2012, 07:46 PM
Perhaps export all bash variables (for reference purposes), locate all PHP-related files on the system, move them into a backup dir and then install PHP from source in the path formerly used by the default PHP installation.