1

I am trying to perform a simple drush rr in my drupal directory. I have been able to do this before, but all of a sudden this no longer works. I have made changes to my drupal site, but I have no idea what might be causing it.

The error is as follows:

chlong@chlong-Vostro-460:/var/www/drupal7$ drush rr
PHP Fatal error:  Call to undefined function lock_acquire() in /var/www/drupal7/includes/bootstrap.inc on line 3106
Drush command terminated abnormally due to an unrecoverable error.     [error]
Error: Call to undefined function lock_acquire() in
/var/www/drupal7/includes/bootstrap.inc, line 3106

Does anyone have any ideas on how to resolve this issue?

  • What is rr command for? I can't find it in docs. – kalabro Jun 7 '12 at 17:56
  • @kalabro, the "rr" is "rebuild registry" – chlong Jun 7 '12 at 18:10
5

Newer versions of Drupal 7.x (7.13+), have added locking to the registry rebuild process. This means that the locking system now needs to be available to call that function.

drush rr specifically tries to include as less as possible, to be able to rebuild the registry before something can break.

For you, this simply means that you need to update your version of registry rebuild, as this has been fixed already.

That said, I am very much looking forward to Drupal 8, for which we are currently working hard to be able remove the registry in favor of a PSR-0 class loader that finds classes based on conventions and does not need to scan files to build up a mapping of class names to files.

0

It looks like your includes/lock.inc file has gone missing. If that's the case, you should download Drupal again.

  • I just checked, my 'includes/lock.inc' file is there. – chlong Jun 7 '12 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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