Forked from Jinksi/gist:d9856f3a053ce7ff29e39d51d6941da0
Last active
February 19, 2025 04:13
-
-
Save deanoakley/f4bcfe047c9798b1e667223a7d5dd839 to your computer and use it in GitHub Desktop.
Serverpilot disable display php errors server-wide
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Append 'display_errors = false' to each PHP version's ini file | |
echo 'display_errors = false' | sudo tee --append /etc/php7.4-sp/php.ini && | |
echo 'display_errors = false' | sudo tee --append /etc/php8.0-sp/php.ini && | |
echo 'display_errors = false' | sudo tee --append /etc/php8.1-sp/php.ini && | |
echo 'display_errors = false' | sudo tee --append /etc/php8.2-sp/php.ini && | |
echo 'display_errors = false' | sudo tee --append /etc/php8.3-sp/php.ini && | |
echo 'display_errors = false' | sudo tee --append /etc/php8.4-sp/php.ini && | |
# Display the contents of each ini file to confirm the changes | |
cat /etc/php7.4-sp/php.ini && | |
cat /etc/php8.0-sp/php.ini && | |
cat /etc/php8.1-sp/php.ini && | |
cat /etc/php8.2-sp/php.ini && | |
cat /etc/php8.3-sp/php.ini && | |
cat /etc/php8.4-sp/php.ini && | |
# Restart each PHP-FPM service to apply the changes | |
sudo service php7.4-fpm-sp restart && | |
sudo service php8.0-fpm-sp restart && | |
sudo service php8.1-fpm-sp restart && | |
sudo service php8.2-fpm-sp restart && | |
sudo service php8.3-fpm-sp restart && | |
sudo service php8.4-fpm-sp restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment