Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
drush cc
Enter a number to choose which cache to clear.
[0] : Cancel
[1] : drush
[2] : registry
2
PHP Fatal error: Call to undefined function lock_acquire() in includes/bootstrap.inc on line 3106
Fatal error: Call to undefined function lock_acquire() in includes/bootstrap.inc on line 3106
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to undefined function lock_acquire() in
includes/bootstrap.inc, line 3106
Comments
Comment #1
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedIf I run drush rr, then I get this:
drush rr
The drush command 'rr' could not be found. Run `drush cache-clear drush` to [error]
clear the commandfile cache if you have installed new extensions.
Could not find a Drupal settings.php file at ./sites/default/settings.php.
Comment #2
rfayWell, if drush rr isn't recognized, then you don't have a bug in this tool. Your problem is that you either haven't installed it right (see the project page) or you need to clear *drush's cache*, which it offerec to you.
Rebuilding the registry cache with
drush cc registry
would not be expected to work if drush rr is needed.Not that you may actually have a code problem.
And it looks like you're trying to run this when not in a drupal install (it can't find the settings.php).
Comment #3
seanrI just got the original error, and yes, I was in a Drupal install:
(anonymized user, server, and domain, of course)
Comment #4
Kristen PolHmmm... I'm getting the error too:
Comment #5
rfayThis is a duplicate of #1565138: Need to include lock.inc with Drupal 7.14 (maybe 7.13 too). It's been fixed in dev for some time. I guess I should make a release.
Comment #6
rfayI did release 7.x-1.9. However, I see that #1565138: Need to include lock.inc with Drupal 7.14 (maybe 7.13 too) was there in 7.x-1.8. Are you both sure you had 7.x-1.8? If so, please follow up over there and reopen that.
Comment #7
chriscalip CreditAttribution: chriscalip commentedError sighted on latest version of drupal and registry_rebuild. For anyone needing to keep forward with this error.
Simply update registry_rebuild.php
FROM :
TO :
Comment #8
omega8cc CreditAttribution: omega8cc commented@chriscalip The
lock.inc
is conditionally added, to properly support external lock methods (like with Redis). Please make sure you are running latestrr
version. The same logic is included in the command line and PHP version, however I don't think we have tested PHP script version to make sure the logic there works properly. Feel free to follow up in the related issue: #1971684: Registry rebuild does not work with non core lock.inc