Back to Error Center
500 Server Error
Error Message
500 SERVER_ERROR
Cause
An unhandled exception occurred. This is a generic error that masks the actual problem. Check the Laravel log file for the real error.
Solution
Check storage/logs/laravel.log for the actual error. Enable APP_DEBUG=true in development to see detailed errors. Check the stack trace for the root cause.
Code Example
Fix
# Check the log file
tail -f storage/logs/laravel.log
# Or in .env for development (never in production)
APP_DEBUG=true
# Clear config cache if changed .env
php artisan config:clear
Debugging Steps
- Check storage/logs/laravel.log for the exception
- Enable APP_DEBUG=true in development only
- Check for PHP syntax errors with php -l
- Review recent code changes
- Check server error logs (Nginx/Apache)
Prevention
Always handle exceptions gracefully. Use try-catch for expected failures. Test code thoroughly before deploying. Keep APP_DEBUG=false in production.