Last active
July 22, 2025 06:20
-
-
Save deanoakley/058c8b6633b216c846955b46be4320a8 to your computer and use it in GitHub Desktop.
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
| # Disable display_errors for all PHP versions on RunCloud | |
| # This script appends 'display_errors = false' to each version's php.ini | |
| # and restarts the matching PHP-FPM services. | |
| # Run the full block as a single command to apply changes in one go: | |
| # | |
| # bash <(curl -s https://gist.githubusercontent.com/yourname/gistid/raw/disable-display-errors-runcloud.sh) | |
| # | |
| # Useful for production environments to suppress PHP errors from showing publicly. | |
| # Append 'display_errors = false' to each PHP version's ini file | |
| echo 'display_errors = false' | sudo tee --append /etc/php74rc/php.ini && | |
| echo 'display_errors = false' | sudo tee --append /etc/php80rc/php.ini && | |
| echo 'display_errors = false' | sudo tee --append /etc/php81rc/php.ini && | |
| echo 'display_errors = false' | sudo tee --append /etc/php82rc/php.ini && | |
| echo 'display_errors = false' | sudo tee --append /etc/php83rc/php.ini && | |
| echo 'display_errors = false' | sudo tee --append /etc/php84rc/php.ini && | |
| # Restart each PHP-FPM service to apply the changes | |
| sudo service php74rc-fpm restart && | |
| sudo service php80rc-fpm restart && | |
| sudo service php81rc-fpm restart && | |
| sudo service php82rc-fpm restart && | |
| sudo service php83rc-fpm restart && | |
| sudo service php84rc-fpm restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment