Search code examples
phpubuntu-18.04laravel-9

Would like a php version of php 8.1 for a specific virtual website


I have a virtual website in an ubuntu 18.04 server that is written in Laravel9 and it needs php version 8.0.2 or higher. The error looks like this in the browser:

Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2".

In the system I have PHP 7.4.29 (cli) but can't change that due to other virtual sites who need 7.4.

How do I get php 8.1 to the Laravel9 site so it works?


Solution

  • Ok, found out that what was needed was a composer command:

    composer install --ignore-platform-reqs
    

    So now no error anymore. Now I have other things to worry about, but thats Laravel stuff.

    My other sites works ok despite php 8.1 now.

    Thanks any way for your help.