1

I have installed Drush 5.6 on my ubuntu machine, and I am now working on a Drupal theme, so I need to clear the cache frequently, but I cannot seem to do it with drush...

When I run the drush cc all inside my drupal site folder, I get the message that it successfully cleared the drush cache.

When I instead run drush cc inside my drupal site folder I get only 3 options (even though I have seen other people get more options here...): to cancel, to clear drush cache, or to clear registry cache. Here I tried to clear the registry cache and got the following error:

Fatal error: Call to undefined function lock_acquire()

pointing me to some bootstrap.inc file

I will be very happy if someone could help me

braX
  • 11,506
  • 5
  • 20
  • 33
Jason Blade
  • 373
  • 2
  • 4
  • 17
  • http://stackoverflow.com/questions/11564017/fatal-error-call-to-undefined-function-lock-acquire-duplicating-drupal-site – Petro Popelyshko Aug 14 '12 at 15:00
  • I tried the suggestion in that thread but instead got this error now: `Fatal error: Call to undefined function db_insert() in /var/www/mysite/includes/lock.inc on line 128` so not so much better... I am still wondering why I get only 3 options when running `drush cc`, some get the option to clear css+js etc? It seems somehow that drush has no access to these caches.. anybody know why? – Jason Blade Aug 14 '12 at 16:53

1 Answers1

1

I just had the same problem. The reason is drush was not able to use the php with MAMP. So you need to add path to your MAMP's php location to ~/.bash_profile.

For me its something like:

export PATH=/Applications/MAMP/bin/php/php5.3.14/bin:$PATH

I am using PHP 5.3 in MAMP, check what version you are using and write the absolute path then do source ~/.bash_profile.

Restart MAMP and re-check.

kenorb
  • 155,785
  • 88
  • 678
  • 743
Sunny
  • 863
  • 9
  • 10