- 🇩🇪Germany asb
Note to self and others encountering a "PHP Fatal error" with Drush, e.g. something like this:
PHP Fatal error: Uncaught Error: Call to undefined function cache_get() in /var/www/{mysite}/includes/module.inc:763 Stack trace: #0 /var/www/{mysite}/includes/module.inc(963): module_implements('system_theme_in...') #1 /var/www/{mysite}/modules/system/system.module(2531): module_invoke_all('system_theme_in...') #2 /var/www/{mysite}/includes/theme.inc(798): _system_rebuild_theme_data() #3 /var/www/{mysite}/includes/theme.maintenance.inc(57): list_themes() #4 /var/www/{mysite}/includes/bootstrap.inc(2965): _drupal_maintenance_theme() #5 /var/www/{mysite}/includes/errors.inc(177): drupal_maintenance_theme() #6 /var/www/{mysite}/includes/bootstrap.inc(2690): _drupal_log_error(Array, true) #7 [internal function]: _drupal_exception_handler(Object(Error)) #8 {main} thrown in /var/www/{mysite}/includes/module.inc on line 763 Drush command terminated abnormally due to an unrecoverable error.
In some cases there is a simple solution: Drush needs to be called as root or with sudo.