I am trying to install Magento 2 in my machine locally but I am getting PHP version check error. How to fix this error. I am using PHP 7.4 version as a default installed by xampp. I have googled & found that by setting "disable-tls: false" will fix this, but I didn't find this in composer.json file & also I have to keep my site SSL secure. Is there any alternate way to fix this error. I am installing on Windows PC. Attached is screenshot. Please take a look.
3 Answers
I think you should uninstall your xampp or wamp software and install same software for php version 7.3
or if you want to run two version of php in xampp you can follow instruction in given below link
https://medium.com/@naingdroid/how-to-install-two-php-versions-in-window-xampp-b1402c23f42
After installation of two version you have to set aliase as php74 as php 7.4 version and php73 as php 7.3 version.
You have to install php 7.2 or 7.3 to complete installation because your php version is 7.4.
you can install php7.2 by using following command if you have linux system.
sudo apt-get install php7.2 libapache2-mod-php7.2 php7.2-mysql php7.2-soap php7.2-bcmath php7.2-xml php7.2-mbstring php7.2-gd php7.2-common php7.2-cli php7.2-curl php7.2-intl php7.2-zip zip unzip -y
Hope it helps you!
-
Hi Aesha, I am using windows PC. Please suggest for windows Commented Aug 15, 2020 at 7:38
-
If you are using php7.4 you need to install Magento 2.4. If you want to use another version you have to install that versions required tech stack. In the screenshot php 7.2 or 7.3 is required.
As you are windows environment you will have to check the documentation or your xxamp or wamp etc stack. The other option is to move to a development os on the technical requirments list Magento provides, a Linux distrabution.
-
Hi Mark how to downgrade from PHP 7.4 to PHP 7.2 or 7.3. using same Magento version? Commented Aug 15, 2020 at 7:55
-
That depends on what your development environment you are using. Wamp, xamp or something else? Commented Aug 15, 2020 at 7:57
-
-
You can follow the answer on this stackoverflow question. stackoverflow.com/a/49586592/7963009 Commented Aug 15, 2020 at 8:11
-