It seems like you have multiple Laravel projects running on the same server with different PHP versions. To fix the errors you're seeing, you need to make sure that each project is using the correct PHP version.
Here's what you can do:
- Update the PHP version for each project in its respective Nginx server block. For example, if you have a Laravel project running on PHP 7.2, you should have the following line in its server block:
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
- Make sure that each project is using the correct version of PHP by running the following command in each project's root directory:
php --version
This should output the correct version of PHP that the project is using.
- If you're still seeing errors, make sure that each project's dependencies are compatible with the PHP version it's using. You can do this by running the following command in each project's root directory:
composer update
This will update the project's dependencies to the latest compatible versions.
- Finally, make sure that each project's
composer.jsonfile specifies the correct PHP version. You can do this by adding the following line to theconfigsection of the file:
"platform": {
"php": "7.2"
}
Replace 7.2 with the correct PHP version for each project.
By following these steps, you should be able to run multiple Laravel projects on the same server with different PHP versions without any issues.