Here's a weird one: I've got two nearly identical server setups, both running Drush 5.9. Both have been happy for a while. Went to use one today, and got the error:

Drush 5.9 does not support Drupal . Use Drush 4 instead. PHP Fatal error: Call to undefined function conf_path() in /var/opt/drush/includes/bootstrap.inc, line 786

The other site runs Drush 5.9 just fine. Any ideas?

  • Somehow Drupal version detection failed and drush thinks it's older version. Are you sure you haven't deleted any files it might be using? – Mołot Dec 10 '13 at 10:24
  • Haven't changed anything. I'm not the only one with access to the server, but I don't think anyone else would, either. Guess I'll see if I can reinstall it. – eljefejb Dec 10 '13 at 17:58
  • 1
    Extreme weirdness! It works fine, now. I ran 'drush status', and the error message isn't appearing anymore. – eljefejb Dec 10 '13 at 21:53
  • 1
    It's magic. Or more magic. I'm glad it works now, and I doubt if we will ever know the truth. – Mołot Dec 10 '13 at 21:54
  • Ha ha! Good story! – eljefejb Dec 10 '13 at 23:54

Without knowing what command you're trying to run or your file structure, it's difficult to say.

Most commonly this happens when your drush has trouble bootstraping your Drupal root, either by corrupted Drupal core files or different loading the wrong files.

In example if you run drush inside Panels module directory it fails, because it contains includes/common.inc file and drush is confused that it's Drupal core version of common.inc so it's loading it and expects that conf_path() should be defined. The same with core/includes/common.inc. Check the _drush_bootstrap_drupal_site_validate() function at drush API site.

I believe this has been fixed in the recent drush (see #60 at GitHub and original issue), so please upgrade it to the recent version (see the instructions).

However in some other circumstances the problem is still happening (#937) for some reason.

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