MacOS – Uninstall PHP on Mac Mountain Lion

homebrewmacosPHP

I have installed PHP 5.4.40 on my Mac OS Mountain Lion, but need >=5.5.9 (for laravel/lumen-framework v5.1.0 installation), so i run installation with package installer,

iMac-Dmitry:Projects dmitry$ curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6

which is finished successful, but i still have: PHP 5.4.40,

iMac-Dmitry:Projects dmitry$ php -v
PHP 5.4.40 (cli) (built: May  3 2015 22:07:42) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

I have no idea how to uninstall old version (i have no installed: yum, apt-get and brew), i don`t remember how i install previous version.

So, please, tell me – how i can uninstall old PHP version from my Mac, without installing additional software (cause it prefer to uninstall it, in the same case as it was installed).

P.S.
Maybe it was installed with the same package installer, but how to uninstall PHP with it?

Best Answer

Don't uninstall the old php as it is /usr/bin and so supplied by Apple and so might affect the OS and Apple might reinstall it as part od an OS upgrade.

The binary install of php puts php in /usr/local/bin/php

To use it either use the full path or alter your PATH environment variable to have /usr/local/bin before /usr/bin