jcadima
1/24/2017 - 5:33 PM

Upgrade built in PHP to version 7 MacOSX

Upgrade built in PHP to version 7 MacOSX


https://php-osx.liip.ch/

run:

$ curl -s https://php-osx.liip.ch/install.sh | bash -s 7.1

if you print php version it will still show the old version and location:
$ php -v
php 5 at /usr/bin/php

then temporarily change bashrc:

export PATH=/usr/local/php5/bin:$PATH


$ source ~/.bashrc

$ sudo apachectl restart

# will output a new location
$ which php
/usr/local/php5/bin/php


# show the new version:
$ php -v
its php 7 now