Installing PHP 5.4 on Mac OS X

1. Install php 5.4 using MacPorts

  • sudo port install php54 php54-apache2handler
  • ./pecl install imagick from /usr/local/php5/bin
  • copy /usr/local/php5/bin/php to /usr/bin
  • add extension=imagick.so to php.ini

2. Comment out php5 module in http.conf

  • #LoadModule php5_module        libexec/apache2/libphp5.so 

 

  • which php
  • phpize

Leave a Reply