Composer dependencies require a PHP version ">= 8.0.2".
Hello Guys,
I just deployed a fresh laravel project(v 8.77.1) to my production server and i keep getting this error
"Composer dependencies require a PHP version ">= 8.0.2"."
I tried using this solution
composer install --ignore-platform-reqs
but it just throws a Http 500 error, i've been tearing my hair out ever since because i don't know what to do.
My Production server uses Ubuntu 20.04 and my php version is 8.0.14
@Sinnbeck I just fixed it right now. I discovered that although i installed a more recent version, phpinfo() still showed the older version, so i had to disable it and enable the new one with ubuntu commands and it works pretty fine now,
Thanks
If anyone gets here from Google like I did, and you use Laravel Forge. Don't forget that, in addition to installing the new PHP version on your server, you also need to go into the site itself, and tell it to use the new version. It can be found in the site under the meta menu.
I installed a script on my subdomain and I keep getting this error after installation:: {Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2".} how can i fix this please
I'm using Valet on Ubuntu with PHP 8.0.14 and Laravel 8.83 and I had excatly the same issue.
The problem occured because I was switching regularly between PHP 7 and PHP 8.
In my case I had to verify if PHP 8 FPM was correctly running and it wasn't.
sudo systemctl status php8.0-fpm
php8.0-fpm.service: Main process exited, code=exited, status=78/CONFIG
php8.0-fpm.service: Failed with result 'exit-code'.
Failed to start The PHP 8.0 FastCGI Process Manager.
Then I removed valet.sock (which was in fact referencing PHP 7)