0

I´m working on Windows 7 and I have 2 Xampp installations:

  • One with PHP 5.6.24
  • Another with PHP 7.2.2

I have tried starting each Xampp individually and phpinfo() gives me the correct PHP version, but if I do php -v I always get that the PHP version is 6.6.24

This is causing the installation issue that shows the following output:

[InvalidArgumentException] Could not find package symfony/skeleton with stability stable in a version installable using your PHP version 5.6.24.

Is there a way of indicating the OS which PHP version to use? I was thinking that perhaps using environment variables could be the solution.

Veve
  • 6,643
  • 5
  • 39
  • 58
  • Rather than edit the question to add the solution, post it as answer! [Answering your own question is not forbidden](https://meta.stackoverflow.com/a/250208/4733879), but [officially encouraged](https://stackoverflow.com/help/self-answer). (there is even an option to answer the question directly at the [Ask a Question](https://stackoverflow.com/questions/ask) page) – Filnor Feb 20 '18 at 10:54
  • 1
    Please don't add texts like "Solved" to the title. Instead, mark the most helpful answer as accepted by clicking the checkmark below the downvote button. – Filnor Feb 20 '18 at 10:58
  • @Veve you are right, its possible to have to different PHP versions and the system environment variable path must contain the version to be used. – Alvaro Garcia Solano Feb 20 '18 at 19:00

1 Answers1

0

Edit by the OP to the question:

It has been resolved by adding the php directory to system environment variable PATH.

Filnor
  • 1,290
  • 2
  • 23
  • 28