1

My Drupal 7 installation works fine, except for drush, which does not.

$ cd /srv/www/drupal_site

$ drush pm-refresh

PHP Fatal error: Call to undefined function user_load() in /usr/share/php/drush/includes/drupal.inc on line 138

Drush command terminated abnormally due to an unrecoverable error.

Error: Call to undefined function user_load() in /usr/share/php/drush/includes/drupal.inc, line 138

Drush was not able to start (bootstrap) Drupal.

This is Drupal 7.24 and drush 5.10.0 from Debian. A couple of modules and themes have been installed from drupal.org but IMHO nothing fancy. Curent versions of drush6 or drush7 refer to a missing drupal_get_profile() function but otherwise don't help.

Any ideas what the cause of this problem is, and/or how to debug this?

EDIT: It works fine, except for these spurious error lines displayed on the web page (even though I do not use any sort of debug mode), as reported by a user:

Notice: Undefined index: post-load integration files in libraries_load_files() (line 697 of /var/www/drupal7/modules/libraries/libraries.module).

This may or may not be related to my problem.

I tried using Drush 6.x/7.x, but it just returns a different error message.

Call to undefined function drupal_get_profile() in /usr/share/php/drush/includes/bootstrap.inc on line 963

drush cc hits an error before it can do anything; the same happens with drush rr, which returns a different error, but equally intractable.

php-apc is not installed; I have Memcached, but killing it didn't change anything.
I did not change any module weights.

closed as too broad by kiamlaluno Mar 21 '17 at 8:00

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Are you having multisite environment? – Mathankumar Apr 14 '14 at 6:36
  • While I do have multiple sites, they each have their own drupal subdirectory, symlinked to the Debian-installed Drupal. – Matthias Urlichs Apr 14 '14 at 8:42
  • @MatthiasUrlichs What's the result of: drush status. Do you have Connected and bootstrap says Successful? – kenorb Mar 8 '15 at 12:59
0

We got the same errors here.

After some time we recognized that our database-import (cloning production db to local dev machine) went wrong and the database wasn't populated properly. After fixing the db the errors went away...

So - my hint: check your database structure and data.

BTW: There is a similar question - but with an memcached in the drupal setup

  • Hmm, "check your database structure and data" is rather open-ended. I did not manually manipulate any database settings or contents and did not deinstall any modules or whatever. The site itself works. – Matthias Urlichs Feb 24 '14 at 14:23
  • In our case the site itself didn't work either - also showing some "function not found" error in the browser. And by checking I meant to look in the database for obvious problems, like tables without any data or tables missing (compared to the source/production database). – gue Feb 24 '14 at 15:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.