4
votes

I am updating to Laravel 5.5. which uses PHP 7.0 version. I need to do setup on my local machine and on AWS as well. First, locally WAMP server is installed which comes with PHP 7.0 ... I've selected it and when localhost is opened I get the message that the PHP version is 7.0.10 ... After changing version numbers for Laravel and PHP in composer.json, I did update and got this message:

  • Problem 1
    • This package requires php >=7.0 but your PHP version (5.6.25) does not satisfy that requirement. Problem 2
    • laravel/framework v5.5.2 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
    • laravel/framework v5.5.1 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
    • laravel/framework v5.5.0 requires php >=7.0 -> your PHP version (5.6.25) does not satisfy that requirement.
    • Installation request for laravel/framework 5.5.* -> satisfiable by laravel/framework[v5.5.0, v5.5.1, v5.5.2].

It is written that I still use 5.6. How can I change this?

3
restart the apache and check againNarayan
Sounds like Apache is using PHP 7, but the CLI (which Composer uses) is still using 5.6iainn
When I run php -i in Command prompt (I use Windows locally) it says that the PHP version is 5.6.25harunB10
@iainn How can I select PHP 7 for composer? I did apache restart and it is still 5.6harunB10
@harunB10 If you are using Windows, reinstall Composer with .exe installer, the installer asks you about PHP interpreter. If you are using other OS, try run Composer with a PHP 7 interpreter.Ivan Montilla

3 Answers

8
votes

According to @iainn Apache is using PHP 7, but the CLI (which Composer uses) is still using 5.6 hence, trying to uninstall and install composer again and select the correct php version (7.0) while setup. Check below screenshot

enter image description here

2
votes

You're getting an error from composer. Try using 'composer install --ignore-platform-reqs' to setup your project folder.

0
votes

Just change varible enviroment on your computer add path php you would you like to use

enter image description here