0

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. enter image description here

1
  • what is php version ?? Aug 15, 2020 at 11:24

3 Answers 3

1

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.

1
  • I will check your method & get back to you. Aug 15, 2020 at 8:37
0

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!

2
  • Hi Aesha, I am using windows PC. Please suggest for windows Aug 15, 2020 at 7:38
  • hi @SalmanDalal you can download xampp for 7.2.0 link
    – Aesha
    Aug 15, 2020 at 8:28
0

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.

5
  • Hi Mark how to downgrade from PHP 7.4 to PHP 7.2 or 7.3. using same Magento version? Aug 15, 2020 at 7:55
  • That depends on what your development environment you are using. Wamp, xamp or something else?
    – Mark Rees
    Aug 15, 2020 at 7:57
  • I am using xampp please suggest. Aug 15, 2020 at 8:01
  • You can follow the answer on this stackoverflow question. stackoverflow.com/a/49586592/7963009
    – Mark Rees
    Aug 15, 2020 at 8:11
  • I will check that answer & get back to you. Aug 15, 2020 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.