PHP Runtime Checklist

PHP CLI, FPM, Composer and web server checks. Last updated August 28, 2026.

PHP incidents often come from runtime differences: CLI PHP is one version, PHP-FPM is another, the web server loads a different php.ini, or an extension exists on staging but not production. The official PHP manual keeps installation notes at php.net/manual/en/install.php; this page focuses on operational checks after PHP is present.

Identify PHP

php -v
which php
php --ini
php -m
php -i | grep -E 'Loaded Configuration|memory_limit|upload_max_filesize|post_max_size'

Composer and dependencies

composer --version
composer validate
composer diagnose
composer show --direct
composer outdated --direct

PHP-FPM and web server

Do not assume CLI PHP and web PHP are identical. Check FPM pools, service state and web server error logs.

systemctl status php-fpm --no-pager
systemctl status php8.2-fpm --no-pager
journalctl -u php-fpm -n 80 --no-pager
nginx -t
apachectl configtest

Common PHP runtime failures

SymptomCheck firstTypical cause
Works in CLI, fails in browserphp --ini, FPM pool config, web logsDifferent config file, user, permissions or extension set.
Class not foundcomposer dump-autoload, vendor directoryAutoload cache or missing dependency deployment.
File upload failsupload_max_filesize, post_max_size, temp directoryConfig limit or write permission.
Database connection failsPDO extension, DSN, firewall, credentialsMissing extension or host reachability problem.

Deployment evidence

git rev-parse --short HEAD
php -v
composer install --no-dev --prefer-dist --optimize-autoloader
php artisan config:cache 2>/dev/null
systemctl reload php-fpm 2>/dev/null
systemctl reload nginx 2>/dev/null

Before changing PHP code, prove the runtime. Version, config file, extensions, service user and web server logs usually narrow the bug faster than guessing.

Related: Linux Admin Commands, Windows Admin Commands, API Debugging Handbook.