I've tried a number of suggestions around similar questions on stackoverflow, but no success.
In summary, my project is failing due to Laravel/composer using the wrong PHP version.
Here's my setup.
- I've set up a subdomain to test out Laravel on a Centos VPS.
- I've set the PHP version for that subdomain to use PHP 8
- if I run /usr/local/bin/php -v, I get back that PHP 8.0.1 is installed (see attached image "1", 1st yellow arrow)
- if I just run php -v, again I get PHP 8.0.1 (see attached image "1", 2nd yellow arrow)
- when I run composer -vvv about, the feedback is that composer is using PHP 5.6.40 (see attached image red arrow "2")
I've also modified composer.config, in the directory my project is in with the following lines
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"config": {
"platform": {
"php": "8.0.1"
}
},
"sort-packages": true
},
so my question is where/how do I change the PHP setting composer is using.
suggestions are greatly appreciated, thxs!