2

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

2 Answers 2

2

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.

1
  • 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. Aug 25, 2010 at 18:28
0

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.

1
  • Thanks for the suggestion. MAMP is currently using 5.3.2 according to the website. I'll updated my question to be more specific. Aug 24, 2010 at 16:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .