/go/displaystartuperrors: displaystartuperrors from the Command Line

/go/displaystartuperrors controls PHP's display_startup_errors setting. It decides whether PHP shows errors that happen while PHP itself is starting up, before any script runs. A typical example is an extension that fails to load. The setting is separate from display_errors, which covers errors raised by scripts (see displayerrors). The command writes the value into every php.ini it finds, for all installed PHP versions, and then schedules a PHP-FPM reload so the change takes effect. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Show the current value
/go/displaystartuperrors return

# Turn it off (recommended for live sites)
/go/displaystartuperrors

# Turn it on while troubleshooting
/go/displaystartuperrors On

Arguments

Argument Required Notes
return No Prints the current value and changes nothing. Not case-sensitive.
<value> No The value to write, usually On or Off. PHP also accepts values such as 1 and 0. The value is not checked.
(none) No Sets Off.

Pass only the value. The command writes all of its arguments into php.ini, so extra words or options, such as On --progress, end up in the file.

Examples

# Turn startup errors on, reproduce the problem, then turn them off
/go/displaystartuperrors On
php -v
/go/displaystartuperrors

# Check the value that PHP on the command line is using
php -r 'echo ini_get("display_startup_errors"), PHP_EOL;'

# Compare the value in every php.ini
sudo grep -H '^display_startup_errors' /etc/php.ini /etc/opt/remi/*/php.ini 2>/dev/null

Output

Display Startup Errors updated successfully.

The message is printed after the files have been processed, even if no php.ini was found.

With return, the command prints the current value, for example Off, and exits with status 1, even though nothing went wrong. A blank line means no value is set.

Message Meaning
Display Startup Errors updated successfully. The run finished.
Unknown operating system. The OS is not AlmaLinux, Rocky, CentOS, Red Hat, Fedora, Debian, or Ubuntu. Nothing is changed.

See the full reference at /go/displaystartuperrors 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.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *