Common causes
- The site's PHP version in the hosting panel is older than the version vendor/ was built for
- composer install or update ran with a newer CLI PHP (or on your laptop) than the web server uses
- The host changed or downgraded the default PHP version, or the domain was moved to a new server
- A .htaccess AddHandler/SetHandler line forces an older PHP version for that folder
- A required extension (intl, sodium, gd) is missing for the web PHP even though the version is correct
How to fix it
- Compare the two versions. The message states the required version and the one 'You are running'. The fix is to make those match, not to hide the check.
- Switch the site's PHP version. In cPanel use MultiPHP Manager or Select PHP Version; on Hostinger use Advanced > PHP Configuration. Pick a version that meets the requirement, then reload the site.
- Look for a PHP handler in .htaccess. cPanel writes a block like AddHandler application/x-httpd-ea-php81 .php to .htaccess. An old copy left after a migration can override the panel setting; update or remove it.
- Or rebuild vendor/ for the server's PHP. If you cannot upgrade PHP, set config.platform.php to the server version and run composer update so Composer picks compatible package versions, then deploy the new composer.lock.
- Install with the same PHP as the web server. On the server, run Composer with the matching binary, e.g. /opt/cpanel/ea-php82/root/usr/bin/php /usr/local/bin/composer install --no-dev.
- Enable missing extensions. If the message lists extensions, enable them for the web PHP version in the hosting panel or install them on the VPS and restart PHP-FPM.
composer.json
{
"require": {
"php": "^8.1"
},
"config": {
"platform": {
"php": "8.1.29"
}
}
} How to stop it happening again
- Set config.platform.php in composer.json to the production PHP version
- Keep SSH/CLI PHP and the website's PHP version the same
- Check the PHP version in the panel before deploying a framework upgrade