Can't install PHP7??

Published 2 weeks 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?

tisuchi
tisuchi
2 weeks ago (175,715 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.

https://laracasts.com/series/php-for-beginners

kims

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!

MaverickChan

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

Sign In or create a forum account to participate in this discussion.