Reputation: 1451
I've installed two xampp in different drives(windows) as follow:
Drive G: xampp (php 5.6)
Drive C: xampp (php 7.2)
I've also set environmental variable to php 7 drive in PATH variable. But still getting error during installing latest laravel that:
This package requires php >=7.0.0 but your PHP version (5.6.35) does not satisfy that requirement.
When I run following command in CMD it also shows php 5.6.3:
php -v
System is restarted, CMD is restared, what else I missed or have to do so that I can get latest PHP version? The strange thing is that when I run php file in xampp with 7 version it shows PHP 7.2.4 in phpinfo().
Note: I do need php 5.6 for other old projects that's why I can't delete second xampp.
Upvotes: 0
Views: 937
Reputation: 339
I am not sure which windows you are using but as i think it is window 10
Make Sure you are adding PATH in your case C:\xampp\php
in system variables instead of user variables
and try to run ECHO %PATH%
in cmd and check if there is path added for PHP 7 not 5.6
Upvotes: 1
Reputation: 2748
If your using linux just update your default php
sudo update-alternatives --set php /usr/bin/php7.2
If your using any other operating system then check how to set default version.
For windows:
Download php from http://php.net/downloads.php and extract it to C:\xampp\php7.2 and set this path.
Upvotes: 0