4

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?

6
  • restart the apache and check again
    – Narayan
    Sep 5, 2017 at 10:06
  • 5
    Sounds like Apache is using PHP 7, but the CLI (which Composer uses) is still using 5.6
    – iainn
    Sep 5, 2017 at 10:08
  • When I run php -i in Command prompt (I use Windows locally) it says that the PHP version is 5.6.25
    – harunB10
    Sep 5, 2017 at 10:09
  • @iainn How can I select PHP 7 for composer? I did apache restart and it is still 5.6
    – harunB10
    Sep 5, 2017 at 10:11
  • 2
    @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. Sep 5, 2017 at 10:12

3 Answers 3

8

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

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

1
0

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

enter image description here

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.