Common Errors
This guide covers the most common errors you’ll encounter and how to fix them. Use Ctrl+F / Cmd+F to search for your specific error message.
White Screen of Death (WSOD)
Symptoms: Blank white page with no content or error messages.
Causes & Solutions:
PHP Fatal Error
# Check PHP error logs tail -f /var/log/apache2/error.log # Or drush watchdog:tail
Memory Limit Exceeded
# In settings.php or settings.local.php ini_set('memory_limit', '512M');
Module Conflict
# Disable recently installed modules drush pmu module_name -y drush cr
Corrupted Cache
# Clear all caches drush cr # Or via database if Drush fails drush sql-cli TRUNCATE TABLE cache_bootstrap; TRUNCATE TABLE cache_render; exit
Prevention:
- Enable error reporting in development:
$config['system.logging']['error_level'] = 'verbose';
- Always test module updates on staging first
Permission Denied Errors
Error: Warning: file_put_contents(sites/default/files/...): failed to open stream: Permission denied
Solutions:
Fix File Permissions
# Set correct ownership (replace www-data with your web server user) sudo chown -R www-data:www-data sites/default/files # Set correct permissions sudo chmod -R 755 sites/default/files
SELinux Issues (CentOS/RHEL)
# Check SELinux status getenforce # Set correct SELinux context sudo chcon -R -t httpd_sys_rw_content_t sites/default/files
Temporary Fix (Development Only)
chmod 777 sites/default/files # NEVER use 777 in production!
Composer Dependency Conflicts
Error: Your requirements could not be resolved to an installable set of packages.
Solutions:
Update Composer
composer self-update composer --version # Should be 2.0+
Clear Composer Cache
composer clear-cache composer update --no-cache
Check PHP Version
php -v # Should match composer.json requirements
Use Specific Versions
# Instead of ymca/website-services:* composer require ymca/website-services:^11.1
Diagnose Conflicts
composer why-not ymca/website-services 11.1.0 composer prohibits ymca/website-services 11.1.0
Database Update Failures
Error: Exception: ... in update hook
Solutions:
Backup First!
drush sql-dump > backup-$(date +%Y%m%d).sql
Run in Safe Mode
# Skip problematic hooks drush updb --entity-updates -y
Check Error Logs
drush watchdog:show --severity=Error
Manual Fix
# Mark update as complete manually (last resort) drush sql-cli INSERT INTO key_value (collection, name, value) VALUES ('system.schema', 'module_name', 's:4:"9001";'); exit
Need more help? See Debugging Techniques or Get Support.