Ramblings on technology with a dash of social commentary
RSS icon Email icon Home icon
  • How to install PHP 5.4 or PHP 5.3 on Mac OS X Yosemite

    Posted on December 14th, 2014 PHP Guru No comments

    Yosemite comes with Apache 2.4 & PHP 5.5 preinstalled. You don’t need MAMP, only MySQL or MariaDB.

    Regardless, you can use PHP 5.5, PHP 5.4 or PHP 5.3 as needed. Try the following…

    sudo mv /usr/local/bin/php /usr/local/bin/php55
     sudo mv /usr/bin/php /usr/bin/php55

    Install PHP 5.4

    brew install php54 php54-mcrypt php54-mysql

    Install PHP 5.3

    brew unlink php54
     brew install php53 php53-mcrypt php53-mysql

    Switch to PHP 5.4

    brew unlink php53
     brew link php54

    Switch to PHP 5.5

    brew unlink php54
     brew unlink php53
     sudo ln -s /usr/local/bin/php55 /usr/local/bin/php
     sudo ln -s /usr/bin/php55 /usr/bin/php


    Leave a reply