Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the recommended way to upgrade PHP to 5.3.3 on Snow Leopard? If I compile from sources does it replace the existing PHP install 5.3.1. I need it because I'm using nginx as my webserver. PHP has merged PHP-FPM(FastCGI) into PHP core with this latest version.

PHP 5.3.1 (cli) (built: Feb 11 2010 02:32:22) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
share|improve this question
up vote 2 down vote accepted

The one I recommend is to use your package manager of choice (eg. MacPorts) to install PHP without having to deal with the version Apple provides. Apple does update the built in version every so often - and changing their install may break your install over top when they make an update available. Alternatively you can install php5 from the source yourself just be sure not to use the same location that Apple's provided version uses (/usr/bin).

Once you've got it installed it's just a matter of loading the appropriate php module for Apache. For nginx I think you have to compile it with the appropriate prefix for where the proper install of PHP is. Most package managers will have their version of nginx use their copy of PHP as well.

share|improve this answer
I think this is probably the best way to do it and agree that you run the risk of Apple updating over top your update. – citadelgrad Aug 25 '10 at 18:28

Have you looked at MAMP as an alternative?

Otherwise you are going to have to replace the default PHP installation. And I have no idea where that is.

share|improve this answer
Thanks for the suggestion. MAMP is currently using 5.3.2 according to the website. I'll updated my question to be more specific. – citadelgrad Aug 24 '10 at 16:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.