Best way to upgrade PHP 5.3 to 5.4
tim at akwebsoft.com
Fri Apr 19 11:49:59 PDT 2013
* Ryan Schmidt <ryandesign at macports.org> [130418 20:15]:
> > Null response from grep, so this is a 'native' install?
Thanks again for the reply!
> Perhaps you're using the PHP that comes with OS X. Or perhaps you
> installed another copy somewhere.
I'm pretty sure that it came with OS X.
> Are you using PHP in a web server? If so, what web server? OS X's
> included copy of Apache 2 or something else? Its configuration
> file will no doubt have an entry for enabling PHP which should
> help you figure out where it is.
Using Apache installed via macportss
> >> If you want php 5.4 for use as an Apache module, you would:
> >> sudo port install php54-apache2handler
> > Understood, and previously would I invoke
> > sudo port install php54
> Previously, you would use
> sudo port install php5 +apache2
> The php5 port is part of the "old" MacPorts PHP world. Instructions for the "old" way are part of this documentation:
> A year ago I rewrote PHP in MacPorts. The new MacPorts PHP world
> is composed of multiple ports with prefixes php53, php54 and php55
> to let you choose the version(s) you want to use. Our
> documentation still needs to be updated to explain these new
> Aside from the Apache 2 module in the php54-apache2handler port,
> you also have the choice of using php54-cgi or php54-fpm; as I
> understand it, FPM is the "new hotness" for PHP:
I _think_ I want php54-cgi
Yeah, probably no need on my workstation, which does not serve
the outside world.
> The php54 port itself contains the command-line version of PHP and some support files, which you will get in any case.
php 5.3~ (the 'native' install) is at /usr/bin.
I presume that php5 will be installed via macports to somewhere
other than that - like /opt/local ? Thus, giving an easy roll-back
So I need:
sudo port install php5 +php54-apache2handler +php54-cgi
tim at tee jay forty nine dot com or akwebsoft dot com
More information about the macports-users