Reputation: 5806
In Homestead.yaml, I've this site:
- map: m2azr.local
to: /Code/m2azr.local
php: "5.6"
When I'm doing bash init.sh
, vagrant up --provision
and vagrant ssh
, I see there are 3 php versions installed: 5.6, 7.0 and 7.1. So it seems I've the right Homestead version (described in https://laravel.com/docs/5.4/homestead).
The set php version in Homestead.yaml is not applied for site m2azr.local
:
phpinfo()
shows php version 7.1.x
composer install
shows an error This package requires php ^5.6 but your PHP version (7.1.7) does not satisfy that requirement.
Why is PHP5.6 not set?
Upvotes: 4
Views: 798
Reputation: 5806
Thanks @Alex for your help. Below, my solution.
This problem was caused by another running vagrant box with the same ip.
I changed my ip
in Homestead.yaml
to 192.168.20.20 (and added subnetmask
255.255.255.0 to the config.vm.network
in Homestead.rb
). Reload with provision.
Upvotes: 2