PHP 5.5.5 on Mavericks + Server.app

First posted on the 26th October, 2013 – IT
Last modified on the 27th October, 2013, at 12:00 am

Mac OS 10.9 Mavericks ships with PHP 5.4.17 under /usr/bin. If you want to upgrade or add other precompiled modules then the easies solution it to install the liip release using the very simple command:

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5

The script also configures Apache to use the new install by adding this file:

/etc/apache2/other/+php-osx.conf

If you are using Server.app, however, this file is ignored so it still used the default version. In order for the Server.app controlled instance of Apache to use the new install you need to mod:

/Library/Server/Web/Config/apache2/httpd_server_app.conf

In the same way as you would mod httpd.conf:

#LoadModule php5_module libexec/apache2/libphp5.so
LoadModule php5_module /usr/local/php5/libphp5.so

Then just test with a phpinfo().