How to Enable PHP Error Logging for Joomla
For a production Joomla site, PHP errors should normally be written to protected logs rather than displayed to visitors. Enable logging using the configuration method supported by the server, verify that PHP can write to the destination, and keep public error display disabled.
Before changing PHP settings
Record the current values and, on production, make changes during a controlled maintenance window. The correct configuration location depends on the host: a control-panel PHP editor, php.ini, PHP-FPM pool settings, or server configuration may be authoritative.
Do not blindly add PHP directives to .htaccess; that method is not supported by every PHP handler and can cause a server error.
Enable logging and keep display disabled
The core PHP settings are conceptually:
log_errors = On
display_errors = OffApply them through the hosting provider's supported interface or server configuration. If you manage PHP-FPM or another service directly, reload/restart it only as required by that environment.
Choose or verify the log destination
PHP's error_log directive can point to a protected file or use the server/SAPI logger. If you specify a file, its directory must be writable by the PHP process and should not be publicly downloadable.
Use the hosting PHP configuration or a temporary restricted phpinfo() page to verify the effective values, then remove the phpinfo file.
Use an appropriate reporting level
error_reporting controls which classes of PHP errors are reported. For troubleshooting, avoid suppressing the class of error you need to diagnose. Joomla's own Error Reporting setting affects Joomla/PHP reporting behavior at the application level but does not replace server-level PHP logging configuration.
Verify that logging actually works
- Reproduce the original Joomla failure once.
- Open the configured PHP or server log.
- Confirm a new entry appears at the expected time.
- Match the URL/action, error message, file, and line.
If nothing appears, verify the site is using the PHP configuration you edited, check destination permissions, and ask the host which log receives PHP errors for that domain.
Return to a secure steady state
Keep display_errors disabled on public production traffic. Remove temporary test files and excessive debugging, then protect and rotate logs according to your operational policy. Logging can remain enabled when it is part of normal monitoring.
Need More Help with Joomla?
Still having trouble? Open a support ticket with QuantaCade Support and we'll be happy to help where we can.
Support priority is given to QuantaCade products, services, and customers. However, we're also happy to assist fellow Joomla users with general Joomla questions and troubleshooting when possible.
QuantaCade is an independent Joomla extension developer and is not official Joomla support. Some issues involving third-party extensions, hosting environments, server configurations, or other systems outside our development control may be beyond what we're able to resolve.