I'm currently setting up a Magento 2.4.3 community edition project locally. I'm already running the PHP 7.4 version as per system requirements. However, after running the compile commands successfully, the storefront is asking for PHP 8.1.
Can you please suggest any items that I need to check?
Thanks!
Solved! Go to Solution.
It seems your Magento storefront is detecting the PHP version incorrectly and assuming PHP 8.1 is required rather than the actual minimum of PHP 7.4 that 2.4.3 supports.
A few things to check on your local environment:
Typically this PHP version detection issue is due to an environment misconfiguration rather than a problem with core Magento 2.4.3 itself.
Get your local env confirmed to be running PHP 7.4/7.3 first. Also trace through config files and custom code to spot anywhere PHP 8.1 could be explicitly getting checked/required incorrectly.
It seems your Magento storefront is detecting the PHP version incorrectly and assuming PHP 8.1 is required rather than the actual minimum of PHP 7.4 that 2.4.3 supports.
A few things to check on your local environment:
Typically this PHP version detection issue is due to an environment misconfiguration rather than a problem with core Magento 2.4.3 itself.
Get your local env confirmed to be running PHP 7.4/7.3 first. Also trace through config files and custom code to spot anywhere PHP 8.1 could be explicitly getting checked/required incorrectly.
Thank you for your help.
The version in the PHP binary path is wrong and it was probably due to multiple switching that I've been doing. After correcting it, my local environment is now working.