2

I cannot install all the laravel dependencies because of the php version but I'm using xampp with (PHP 7.0.13) using echo phpversion(); to determine my php version but this laravel keeps telling me that I'm using php version 5.4.24 when I'm installing a new laravel directory.

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\User>cd C:\xampp

C:\xampp>laravel new htdocs
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php >=5.6.4 but your PHP version (5.4.24) does not satisfy that requirement.
  Problem 2
    - Installation request for classpreloader/classpreloader 3.1.0 -> satisfiable by classpreloader/classpreloader[3.1.0].
    - classpreloader/classpreloader 3.1.0 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 3
    - Installation request for laravel/framework v5.3.28 -> satisfiable by laravel/framework[v5.3.28].
    - laravel/framework v5.3.28 requires php >=5.6.4 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 4
    - Installation request for league/flysystem 1.0.32 -> satisfiable by league/flysystem[1.0.32].
    - league/flysystem 1.0.32 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 5
    - Installation request for nikic/php-parser v3.0.2 -> satisfiable by nikic/php-parser[v3.0.2].
    - nikic/php-parser v3.0.2 requires php >=5.5 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 6
    - Installation request for symfony/console v3.1.8 -> satisfiable by symfony/console[v3.1.8].
    - symfony/console v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 7
    - Installation request for symfony/debug v3.1.8 -> satisfiable by symfony/debug[v3.1.8].
    - symfony/debug v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 8
    - Installation request for symfony/event-dispatcher v3.2.1 -> satisfiable by symfony/event-dispatcher[v3.2.1].
    - symfony/event-dispatcher v3.2.1 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 9
    - Installation request for symfony/finder v3.1.8 -> satisfiable by symfony/finder[v3.1.8].
    - symfony/finder v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 10
    - Installation request for symfony/http-foundation v3.1.8 -> satisfiable by symfony/http-foundation[v3.1.8].
    - symfony/http-foundation v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 11
    - Installation request for symfony/http-kernel v3.1.8 -> satisfiable by symfony/http-kernel[v3.1.8].
    - symfony/http-kernel v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 12
    - Installation request for symfony/process v3.1.8 -> satisfiable by symfony/process[v3.1.8].
    - symfony/process v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 13
    - Installation request for symfony/routing v3.1.8 -> satisfiable by symfony/routing[v3.1.8].
    - symfony/routing v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 14
    - Installation request for symfony/translation v3.1.8 -> satisfiable by symfony/translation[v3.1.8].
    - symfony/translation v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 15
    - Installation request for symfony/var-dumper v3.1.8 -> satisfiable by symfony/var-dumper[v3.1.8].
    - symfony/var-dumper v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 16
    - Installation request for phpdocumentor/reflection-common 1.0 -> satisfiable by phpdocumentor/reflection-common[1.0].
    - phpdocumentor/reflection-common 1.0 requires php >=5.5 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 17
    - Installation request for phpdocumentor/reflection-docblock 3.1.1 -> satisfiable by phpdocumentor/reflection-docblock[3.1.1].
    - phpdocumentor/reflection-docblock 3.1.1 requires php >=5.5 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 18
    - Installation request for phpdocumentor/type-resolver 0.2.1 -> satisfiable by phpdocumentor/type-resolver[0.2.1].
    - phpdocumentor/type-resolver 0.2.1 requires php >=5.5 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 19
    - Installation request for phpunit/php-code-coverage 4.0.4 -> satisfiable by phpunit/php-code-coverage[4.0.4].
    - phpunit/php-code-coverage 4.0.4 requires php ^5.6 || ^7.0 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 20
    - Installation request for phpunit/phpunit 5.7.5 -> satisfiable by phpunit/phpunit[5.7.5].
    - phpunit/phpunit 5.7.5 requires php ^5.6 || ^7.0 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 21
    - Installation request for phpunit/phpunit-mock-objects 3.4.3 -> satisfiable by phpunit/phpunit-mock-objects[3.4.3].
    - phpunit/phpunit-mock-objects 3.4.3 requires php ^5.6 || ^7.0 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 22
    - Installation request for sebastian/code-unit-reverse-lookup 1.0.0 -> satisfiable by sebastian/code-unit-reverse-lookup[1.0.0].
    - sebastian/code-unit-reverse-lookup 1.0.0 requires php >=5.6 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 23
    - Installation request for sebastian/environment 2.0.0 -> satisfiable by sebastian/environment[2.0.0].
    - sebastian/environment 2.0.0 requires php ^5.6 || ^7.0 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 24
    - Installation request for sebastian/object-enumerator 2.0.0 -> satisfiable by sebastian/object-enumerator[2.0.0].
    - sebastian/object-enumerator 2.0.0 requires php >=5.6 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 25
    - Installation request for sebastian/resource-operations 1.0.0 -> satisfiable by sebastian/resource-operations[1.0.0].
    - sebastian/resource-operations 1.0.0 requires php >=5.6.0 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 26
    - Installation request for sebastian/version 2.0.1 -> satisfiable by sebastian/version[2.0.1].
    - sebastian/version 2.0.1 requires php >=5.6 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 27
    - Installation request for symfony/css-selector v3.1.8 -> satisfiable by symfony/css-selector[v3.1.8].
    - symfony/css-selector v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 28
    - Installation request for symfony/dom-crawler v3.1.8 -> satisfiable by symfony/dom-crawler[v3.1.8].
    - symfony/dom-crawler v3.1.8 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 29
    - Installation request for symfony/yaml v3.2.1 -> satisfiable by symfony/yaml[v3.2.1].
    - symfony/yaml v3.2.1 requires php >=5.5.9 -> your PHP version (5.4.24) does not satisfy that requirement.
  Problem 30
    - nikic/php-parser v3.0.2 requires php >=5.5 -> your PHP version (5.4.24) does not satisfy that requirement.
    - psy/psysh v0.8.0 requires nikic/php-parser ~1.3|~2.0|~3.0 -> satisfiable by nikic/php-parser[v3.0.2].
    - Installation request for psy/psysh v0.8.0 -> satisfiable by psy/psysh[v0.8.0].

Application ready! Build something amazing.

C:\xampp>
Kevin Karl Leaño
  • 1,630
  • 3
  • 15
  • 20

3 Answers3

2

Already solved. It seems that my system is using another php version from IIS Express which uses old version of the php. I just change my environment variable to point to my xampp php which has the latest php version

Kevin Karl Leaño
  • 1,630
  • 3
  • 15
  • 20
1

I had this issue just now and I fixed it by changing the Path environment variable from the operating system to point to the wamp php folder which contains the latest php version. In order to do this (I had to research this too) - I went to this link and followed the instructions: https://www.java.com/en/download/help/path.xml

The old Path variable looked like this: C:\wamp64\bin\php\php5.6.25 and I changed it to C:\wamp64\bin\php\php7.0.10 Saved everything, closed everything, restarted my PC and then it worked with no problems. Hope this saves some research time for someone.

JustNatural
  • 375
  • 7
  • 19
1

You need to do one of two things.

Solution 1 - You need to update your PHP version. If you don't have the correct version, Laravel won't run correctly.

Solution 2 - Maybe you have the correct PHP version, but composer can't see that for some reason. Easy fix, you just need to use the --ignore-platform-reqs command. This will allow you to install things with composer regardless of PHP version.

Jacob
  • 890
  • 10
  • 30