Can't install PHP7??

Published 9 months ago by kims

Hello, I'm new to php and I'm trying to install PHP7 to my computer. I already have PHP 5.6.28 installed (this is what comes up when typing php -v in terminal). I want to get the latest stable version and I've tried installing it via homebrew. I've looked at the laracast instructions, but it did not work. I believe php7 is on my machine, but when I type php -v, it still says PHP 5.6.28 I've looked at several internet solutions for installing and it did not work either. Is there a fool proof way to install/use php7 that I may have missed?

9 months ago (303,035 XP)

Welcome to PHP world.

I am not sure that what series of video tutorial you are following on, however, you may check this series. I hope it will help you.

9 months ago (1,940 XP)

Thank you for the welcome and for your help. I did figure out what went wrong. I had to type in:

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

in terminal for it to show the newly downloaded version of php on my machine. Otherwise, it continues to show the older version when typing in php -v. So yep! Thanks!


@kims if you are using a Mac , try unlink php5 .

Please sign in or create an account to participate in this conversation.