Troubleshoot 500 errors
Updated
❗
Internal Server Error.
A 500 Internal Server Error means the request reached the environment and failed there, almost always in the application code or in `.htaccess`. The logs in the dashboard name the cause.
Read the logs
Open the logs of the environment and reload the failing page. The PHP log holds fatal errors with file and line. The Apache error log names the cause with an AHxxxxx code: The 500 errors chart shows when the errors started and how often they occur.
| Code | Cause |
|---|---|
AH01071 | PHP printed a fatal error, quoted in the log line |
AH00124 | A rewrite loop in .htaccess |
Invalid command or not allowed here | A directive .htaccess may not use, see .htaccess troubleshooting |
A 500 on every page right after a change to .htaccess points to the file itself: Apache rejects the whole file for one bad line.
Review the latest changes
A 500 usually follows a deployment, an update or a changed setting. Run the same code in the local development environment and compare. Typical differences on fortrabbit: a missing ENV var, a PHP extension that is off, or a different PHP version.
Many frameworks hide the error details in production. Laravel's APP_DEBUG and Craft's CRAFT_DEV_MODE show them; turn them on only on an environment that is not public.
Platform status
When the logs show nothing, check the fortrabbit status page for incidents.