Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". on c panel server
Hi, I am a web design teacher at a college and used Laravel 8 last year to get students to create a blog. I want to keep using Laravel next year but get students to host the website. Some students got this message when running their app, but we fixed it by using composer install --ignore-platform-req=php. I understand Laravel should probably not be hosted on shared hosting like C Panel, but I need to use free hosting for students due to financial constraints. Heroku is too complicated for my students as they are on a Media/Technology degree. I am trying to get Laravel running on Infinity Free hosting (C Panel) but the highest PHP version is 7.4 (which should run Laravel 8). Does anyone know how I can force Laravel 8 to use PHP 7.4 on a shared C Panel server?
@Sinnbeck - How to I install locally on 7.4? I am using composer and I think it must pick the highest version of PHP when creating a project? But again, that is a guess as I an new to Laravel.
@Sinnbeck - I am using a mac for local development and have homebrew installed. I found an article on StackOverflow about installing older versions of PHP on a mac. I will give it a go. Thanks
This setting to override default php version and it is generated from a cPanel you can modify it if you are aware about php versions in you cPanel.
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php56” package as the default “PHP” programming language.
<IfModule mime_module>
AddType application/x-httpd-ea-php56 .php .php5 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit