I have a magento2 store that works just fine on the hosted url (through A2 hosting).
I am trying to get a local copy of this instance so that I can develop, test, and then push to staging, production etc...
I am using docker and have followed all the steps necessary to launch a local instance of magento. I am at the last step, and when I am launching docker, I am getting the following error at my localhost url I have mapped to docker:
Magento supports PHP 7.1.3 or later. Please read Magento System Requirements.
The offical documentation along with everything else I have found have pointed to 2 issues:
- PHP version not being 7.1.3 or later, or an issue with apache, more specifically, apache not being configured to run with 7.2
I have installed 7.2 and followed all the instructions with homebrew to make sure apache is fresh and running with 7.2 (i think).
Here is my current PHP version:
$ php -v
PHP 7.2.18 (cli) (built: May 21 2019 20:18:44) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
i cannot seem to find a consistent answer on a command on how to see is apache is using the correct version of PHP. My computer clearly shows 7.2.18, and in my httpd.conf I have included:
LoadModule php7_module /usr/local/opt/php/lib/httpd/modules/libphp7.so
as instructed by the tutorial. So I am not sure what is happening at this point. My only guess is that somehow still apache and my local PHP are out of sync, which is leading to magento throwing this error and telling me that I need 7.1.3 or higher, when I clearly have 7.2.18
Note: I have restarted apache multiple times with
sudo apachectl -k restart
and each time i tear down the docker containers and machine instance, restart the machine and containers etc...
What else could possibly be the problem? What command can I run to ensure apache is using PHP 7.2?