I have a dummy website written in Laravel9 on an ubuntu 18.04 server, it requires php version 8.0.2 or higher. The error looks like this in the browser:
Composer has detected a problem on your platform: Your Composer dependency requires PHP version '>= 8.0.2'.
In the system I have PHP 7.4.29 (cli) but can't change it since other virtual sites require 7.4.
How to get php 8.1 to Laravel9 site to make it work?
If using Debian/Ubuntu:
CentOS:
Okay, I found that what is needed is a composer command:
So now there are no more errors. Now I have other things to worry about, but that's Laravel's thing.
My other sites still work fine despite now being on php 8.1.
thanks for your help.