Skip to content

Security checks: PHP

The PHP version and error display settings. From the command line, rConfig reads them from the web server’s PHP through a signed, loopback-only address, because the command line often loads a different php.ini. If that fails it reads the command-line PHP and says so in the evidence.

From V8.3.0, these checks run in php artisan rconfig:security-check and in Security Center. Run only this group with:

Terminal window
cd /var/www/html/rconfig
php artisan rconfig:security-check --only=php

A failing check shows the fix for your server, with its real paths, on the page and in the command output. The fixes below use the default install folder, /var/www/html/rconfig.

Check Severity Checks that
php.version_min High PHP meets rConfig’s minimum version
php.display_errors High PHP errors are logged, not shown

Check ID: php.version_min · Severity: High

Why it matters: rConfig’s PHP minimum tracks PHP security releases. Older PHP builds carry known flaws that PHP has already fixed.

How to fix: Update PHP through the server’s package updates (sudo dnf upgrade 'php*' or sudo apt upgrade 'php8.4*'), then restart PHP-FPM, Apache and Horizon.

References: NIST SI-2, NIS2 21(2)(e), CIS Controls 7.3


Check ID: php.display_errors · Severity: High

Why it matters: Errors printed to the page reveal file paths, queries and values to whoever triggered them. They belong in the log only.

How to fix: Set display_errors = Off, display_startup_errors = Off and log_errors = On in php.ini (e.g. /etc/php.ini or /etc/php/8.4/fpm/php.ini), then restart PHP-FPM or Apache.

References: NIST SI-11, OWASP ASVS V7.4


See Security hardening for the server settings behind these checks.