Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save deanoakley/f4bcfe047c9798b1e667223a7d5dd839 to your computer and use it in GitHub Desktop.

Select an option

Save deanoakley/f4bcfe047c9798b1e667223a7d5dd839 to your computer and use it in GitHub Desktop.
Serverpilot disable display php errors server-wide
# One liner to disable display_errors for all installed ServerPilot PHP versions, then restart matching FPM services
for ini in /etc/php*-sp/php.ini; do [ -f "$ini" ] && sudo sed -i '/^display_errors\s*=/d' "$ini" && echo 'display_errors = false' | sudo tee -a "$ini" > /dev/null; done; for svc in /etc/init.d/php*-fpm-sp; do [ -e "$svc" ] && sudo service "$(basename "$svc")" restart; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment