How do I update my MacBook to PHP 7.1?

Hi Drupal community,

First and foremost I basically have 0 coding experience and 0 experience with CMS but recently decided to play around with the two as I’m planning on building my own site in the near future for a business idea. Of course I could get a pro to do it but I want to see whether it’s something I’m capable of doing myself beforehand.

This is probably a rookie question but could someone help explain how to upgrade to PHP 7.1? My system is currently macOS Sierra 10.12.6.

I followed the steps in multiple forums and it seems like I was able to upgrade to PHP 7.2 using HomeBrew but when I run Drupal I still get warnings from the requirements review section saying:

PHP 5.5.38 Drupal will drop support for this version on March 6, 2019. Upgrade to PHP version 7.1 or higher to ensure your site can receive updates and remain secure. See PHP’s version support documentation and the Drupal 8 PHP requirements handbook page for more information.

(No idea how to close quotes btw)

I managed to upgrade my PHP version (or supposedly so) using the steps on this forum https://murze.be/how-to-upgrade-from-php-71-to-72-on-macos-using-homebrew and I also tried following this one https://gist.github.com/pixeline/51c43c787f51b018d484597f30be3d2b and this one https://medium.com/zenchef-tech-and-product/how-to-upgrade-your-version-….

And when I check my PHP version on Terminal this is what I get:

Ignatiuss-MacBook:~ Ignatius$ php -v

PHP 7.2.6 (cli) (built: May 25 2018 06:18:07) ( NTS )

Copyright (c) 1997-2018 The PHP Group

Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

    with Zend OPcache v7.2.6, Copyright (c) 1999-2018, by Zend Technologies

I’ve restarted my laptop thrice but once I go to the set up stage on Drupal it still gives me the warning that my PHP is still version 5. If anyone could help me out I would be forever grateful!

Many thanks!

Goldchocobo (the CMS and coding newbie)


Source: https://www.drupal.org/taxonomy/term/22/feed