I'm trying to get my Laravel project to work. But when I use composer update it says the following:
This package requires php >=5.6.4 but your PHP version (5.5.12) does not satisfy that requirement.
I'm using WAMP which runs php version 7.0.4 this is also confirmed in the browser if I echo the php version. But when I use php -v in the console it shows that I'm using PHP version 5.5.12 (cli).
I've searched a bit around on google and I found out that it uses my windows PHP version instead of my webserver's version. But I couldn't find out how to update my PHP version on Windows.
My PATH contents are as shown in the following image
Download PHP 7.4 from the Official Website. In the first step, to install PHP 7.4 on Windows 10 Operating System, open your favorite web browser and navigate the official website of PHP. Next, download the 64 bit Non-Thread-Safe version of the PHP7 Installer zip file on your system.
PHP 8: All You Need to Know to Upgrade. PHP 8 has been officially released for general users on November 26, 2020. This new update brings a number of powerful features and optimizations to the language.
You can uninstall composer, and while re-installing it will ask you to point at your PHP directory which is going to be C:\wamp64\bin\php (usually) at that point you can choose which PHP version you would want to use. good luck.
This means you have yet another installation of PHP
in your system. Check your Programs
in Control Panel
and remove such installation.
However, you can modify your PATH
environment variable as well. Procedure
Just remove the path that points to any PHP
installation directory.
Else, otherwise, if you are unsure about changing the PATH
variable (which can lead to serious problems if not set well), you can just delete the directory that the PATH
variable points to.... (I mean the PHP
directory)
The totally better solution is to add the path of your PHP7
bin directory at the beginning of the PATH
variable. You should also make available composer
in this PHP7
bin directory.
Such as, replace the C:\php
in your path with C:\wamp\bin\php7
or whatever the location of the PHP7
path is..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With