/go/errorreporting sets PHP's error_reporting directive in every php.ini file on the server — one setting, applied to every installed PHP version at once, for FPM, CLI, and (on Debian and Ubuntu) Apache's mod_php. It can also read back the current value. A reload of PHP-FPM is scheduled for about a minute later, so new PHP requests don't need a separate restart command. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Show errors and warnings, but not notices or deprecations
/go/errorreporting "E_ALL & ~E_NOTICE & ~E_DEPRECATED"
# Check the current value
/go/errorreporting return
Options
| Argument | Notes |
|---|---|
| (none) | Sets the default, 5. |
return |
Reads instead of writes. Not case-sensitive (RETURN, Return also work). |
<value> |
Any value PHP’s error_reporting accepts: a plain integer (5), or a named expression (E_ALL & ~E_DEPRECATED & ~E_STRICT). Not validated. |
Examples
# Production: hide notices and deprecation warnings, keep errors visible
/go/errorreporting "E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT"
# Development: show everything
/go/errorreporting "E_ALL"
# Reset to the default (errors and parse errors only)
/go/errorreporting
# Check the current value
/go/errorreporting return
Output
| Outcome | Output |
|---|---|
| Value set | Error Reporting updated successfully. |
return |
The current value (may be empty if not set in that file) |
The confirmation message prints even if no php.ini file was found or none was changed.
See the full reference at /go/errorreporting and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
