Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.