New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Call to undefined function Drush\Boot\conf_path() in DrupalBoot.php, line 375 #1335

Closed
PLPeeters opened this Issue Apr 13, 2015 · 28 comments

Comments

Projects
None yet
@PLPeeters
Contributor

PLPeeters commented Apr 13, 2015

I'm getting this error when trying to use Drush on a Drupal 8.0.x install:

Drush 7.0-dev does not support Drupal .                              [error]
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Call to undefined function Drush\Boot\conf_path() in
/Users/username/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php,
line 375

I'm on both the latest dev version of Drush and the latest dev version of Drupal 8.0.x. This issue started happening the last time I updated them both. I tried installing my project on another computer, but the issue happens there too.

Any useful information I can provide?

@weitzman

This comment has been minimized.

Show comment
Hide comment
@weitzman

weitzman Apr 13, 2015

Member

On that line 375 of DrupalBoot.php, does the error go away if you do\conf_path() instead of conf_path(). The leading slash assures that the global namespace is used. If that fixes it, I wonder why I am not seeing an error and you are. I am on PHP 5.5.11. Maybe it is error level dependant? Do you have a custom boot class?

Member

weitzman commented Apr 13, 2015

On that line 375 of DrupalBoot.php, does the error go away if you do\conf_path() instead of conf_path(). The leading slash assures that the global namespace is used. If that fixes it, I wonder why I am not seeing an error and you are. I am on PHP 5.5.11. Maybe it is error level dependant? Do you have a custom boot class?

@PLPeeters

This comment has been minimized.

Show comment
Hide comment
@PLPeeters

PLPeeters Apr 13, 2015

Contributor

Doesn't change anything, unfortunately. I'm on PHP 5.6.2 and, to my knowledge, don't have a custom boot class.

Contributor

PLPeeters commented Apr 13, 2015

Doesn't change anything, unfortunately. I'm on PHP 5.6.2 and, to my knowledge, don't have a custom boot class.

@weitzman weitzman added the type-bug label Apr 13, 2015

@weitzman weitzman added this to the Drush7 milestone Apr 13, 2015

@PLPeeters

This comment has been minimized.

Show comment
Hide comment
@PLPeeters

PLPeeters May 11, 2015

Contributor

I fixed this by doing a completely fresh install of Drupal 8.0.x-dev via drush dl drupal-8.0.x.

Contributor

PLPeeters commented May 11, 2015

I fixed this by doing a completely fresh install of Drupal 8.0.x-dev via drush dl drupal-8.0.x.

@PLPeeters PLPeeters closed this May 11, 2015

@el22or

This comment has been minimized.

Show comment
Hide comment
@el22or

el22or Oct 2, 2015

This is here again...

PHP Fatal error:  Call to undefined function conf_path() in /usr/local/src/drush/lib/Drush/Boot/DrupalBoot.php on line 383
PHP Stack trace:
PHP   1. {main}() /usr/local/src/drush/drush.php:0
PHP   2. drush_main() /usr/local/src/drush/drush.php:11
PHP   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /usr/local/src/drush/drush.php:70
PHP   4. drush_dispatch() /usr/local/src/drush/lib/Drush/Boot/BaseBoot.php:62
PHP   5. call_user_func_array:{/usr/local/src/drush/includes/command.inc:178}() /usr/local/src/drush/includes/command.inc:178
PHP   6. drush_command() /usr/local/src/drush/includes/command.inc:178
PHP   7. _drush_invoke_hooks() /usr/local/src/drush/includes/command.inc:210
PHP   8. call_user_func_array:{/usr/local/src/drush/includes/command.inc:359}() /usr/local/src/drush/includes/command.inc:359
PHP   9. drush_core_help() /usr/local/src/drush/includes/command.inc:359
PHP  10. drush_bootstrap_max() /usr/local/src/drush/commands/core/help.drush.inc:277
PHP  11. drush_bootstrap_validate() /usr/local/src/drush/includes/bootstrap.inc:465
PHP  12. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate() /usr/local/src/drush/includes/bootstrap.inc:389
PHP  13. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate_settings_present() /usr/local/src/drush/lib/Drush/Boot/DrupalBoot.php:325

Fatal error: Call to undefined function conf_path() in /usr/local/src/drush/lib/Drush/Boot/DrupalBoot.php on line 383

Call Stack:
    0.0006     245600   1. {main}() /usr/local/src/drush/drush.php:0
    0.0006     245792   2. drush_main() /usr/local/src/drush/drush.php:11
    0.2605    7664808   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /usr/local/src/drush/drush.php:70
    0.2638    7674176   4. drush_dispatch() /usr/local/src/drush/lib/Drush/Boot/BaseBoot.php:62
    0.2644    7678736   5. call_user_func_array:{/usr/local/src/drush/includes/command.inc:178}() /usr/local/src/drush/includes/command.inc:178
    0.2644    7679056   6. drush_command() /usr/local/src/drush/includes/command.inc:178
    0.2647    7683328   7. _drush_invoke_hooks() /usr/local/src/drush/includes/command.inc:210
    0.2654    7714480   8. call_user_func_array:{/usr/local/src/drush/includes/command.inc:359}() /usr/local/src/drush/includes/command.inc:359
    0.2654    7715008   9. drush_core_help() /usr/local/src/drush/includes/command.inc:359
    0.2655    7715312  10. drush_bootstrap_max() /usr/local/src/drush/commands/core/help.drush.inc:277
    0.2867    6505856  11. drush_bootstrap_validate() /usr/local/src/drush/includes/bootstrap.inc:465
    0.2868    6507032  12. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate() /usr/local/src/drush/includes/bootstrap.inc:389
    0.3242    6533776  13. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate_settings_present() /usr/local/src/drush/lib/Drush/Boot/DrupalBoot.php:325

Drush command terminated abnormally due to an unrecoverable error.                                                                                                                             [error]
Error: Call to undefined function conf_path() in /usr/local/src/drush/lib/Drush/Boot/DrupalBoot.php, line 383

And trick from previous comment doesn't work.
PHP 5.6.13
Drush updated to latest version.

Drush works perfectly in other Drupal 8 projects, just doesn't work with latest Drupal which is 8.0.0-beta16.

el22or commented Oct 2, 2015

This is here again...

PHP Fatal error:  Call to undefined function conf_path() in /usr/local/src/drush/lib/Drush/Boot/DrupalBoot.php on line 383
PHP Stack trace:
PHP   1. {main}() /usr/local/src/drush/drush.php:0
PHP   2. drush_main() /usr/local/src/drush/drush.php:11
PHP   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /usr/local/src/drush/drush.php:70
PHP   4. drush_dispatch() /usr/local/src/drush/lib/Drush/Boot/BaseBoot.php:62
PHP   5. call_user_func_array:{/usr/local/src/drush/includes/command.inc:178}() /usr/local/src/drush/includes/command.inc:178
PHP   6. drush_command() /usr/local/src/drush/includes/command.inc:178
PHP   7. _drush_invoke_hooks() /usr/local/src/drush/includes/command.inc:210
PHP   8. call_user_func_array:{/usr/local/src/drush/includes/command.inc:359}() /usr/local/src/drush/includes/command.inc:359
PHP   9. drush_core_help() /usr/local/src/drush/includes/command.inc:359
PHP  10. drush_bootstrap_max() /usr/local/src/drush/commands/core/help.drush.inc:277
PHP  11. drush_bootstrap_validate() /usr/local/src/drush/includes/bootstrap.inc:465
PHP  12. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate() /usr/local/src/drush/includes/bootstrap.inc:389
PHP  13. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate_settings_present() /usr/local/src/drush/lib/Drush/Boot/DrupalBoot.php:325

Fatal error: Call to undefined function conf_path() in /usr/local/src/drush/lib/Drush/Boot/DrupalBoot.php on line 383

Call Stack:
    0.0006     245600   1. {main}() /usr/local/src/drush/drush.php:0
    0.0006     245792   2. drush_main() /usr/local/src/drush/drush.php:11
    0.2605    7664808   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /usr/local/src/drush/drush.php:70
    0.2638    7674176   4. drush_dispatch() /usr/local/src/drush/lib/Drush/Boot/BaseBoot.php:62
    0.2644    7678736   5. call_user_func_array:{/usr/local/src/drush/includes/command.inc:178}() /usr/local/src/drush/includes/command.inc:178
    0.2644    7679056   6. drush_command() /usr/local/src/drush/includes/command.inc:178
    0.2647    7683328   7. _drush_invoke_hooks() /usr/local/src/drush/includes/command.inc:210
    0.2654    7714480   8. call_user_func_array:{/usr/local/src/drush/includes/command.inc:359}() /usr/local/src/drush/includes/command.inc:359
    0.2654    7715008   9. drush_core_help() /usr/local/src/drush/includes/command.inc:359
    0.2655    7715312  10. drush_bootstrap_max() /usr/local/src/drush/commands/core/help.drush.inc:277
    0.2867    6505856  11. drush_bootstrap_validate() /usr/local/src/drush/includes/bootstrap.inc:465
    0.2868    6507032  12. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate() /usr/local/src/drush/includes/bootstrap.inc:389
    0.3242    6533776  13. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate_settings_present() /usr/local/src/drush/lib/Drush/Boot/DrupalBoot.php:325

Drush command terminated abnormally due to an unrecoverable error.                                                                                                                             [error]
Error: Call to undefined function conf_path() in /usr/local/src/drush/lib/Drush/Boot/DrupalBoot.php, line 383

And trick from previous comment doesn't work.
PHP 5.6.13
Drush updated to latest version.

Drush works perfectly in other Drupal 8 projects, just doesn't work with latest Drupal which is 8.0.0-beta16.

@michaellenahan

This comment has been minimized.

Show comment
Hide comment
@michaellenahan

michaellenahan Oct 2, 2015

I can confirm the same problem with Drupal 8.0.0-beta16

I can confirm the same problem with Drupal 8.0.0-beta16

@weitzman

This comment has been minimized.

Show comment
Hide comment
@weitzman

weitzman Oct 2, 2015

Member

Your version of Drupal is not getting recognized. Please provide exact steps to reproduce. This is an fresh download? The command you are running is site-install?

Member

weitzman commented Oct 2, 2015

Your version of Drupal is not getting recognized. Please provide exact steps to reproduce. This is an fresh download? The command you are running is site-install?

@weitzman

This comment has been minimized.

Show comment
Hide comment
@weitzman

weitzman Oct 2, 2015

Member

I cant reproduce the problem with fresh download

Member

weitzman commented Oct 2, 2015

I cant reproduce the problem with fresh download

@weitzman weitzman reopened this Oct 2, 2015

@el22or

This comment has been minimized.

Show comment
Hide comment
@el22or

el22or Oct 2, 2015

Try anywhere drush dl drupal-8.0.x, then cd drupal-8.0.x, then drush.

el22or commented Oct 2, 2015

Try anywhere drush dl drupal-8.0.x, then cd drupal-8.0.x, then drush.

@michaellenahan

This comment has been minimized.

Show comment
Hide comment
@michaellenahan

michaellenahan Oct 2, 2015

Ubuntu 14.04
PHP 5.6.12-1+deb.sury.org~trusty+1 (cli)

composer create-project drupal-composer/drupal-project:8.x-dev test --stability dev --no-interaction
cd test/web
drush si --db-url=mysql://test:test@localhost/test
You are about to DROP all tables in your 'test' database. Do you want to continue? (y/n): y
PHP Fatal error:  Call to undefined function conf_path() in /home/michael/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php on line 380
PHP Stack trace:
PHP   1. {main}() /home/michael/.composer/vendor/drush/drush/drush.php:0
PHP   2. drush_main() /home/michael/.composer/vendor/drush/drush/drush.php:11
PHP   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /home/michael/.composer/vendor/drush/drush/drush.php:70
PHP   4. drush_dispatch() /home/michael/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:62
PHP   5. call_user_func_array:{/home/michael/.composer/vendor/drush/drush/includes/command.inc:178}() /home/michael/.composer/vendor/drush/drush/includes/command.inc:178
PHP   6. drush_command() /home/michael/.composer/vendor/drush/drush/includes/command.inc:178
PHP   7. _drush_invoke_hooks() /home/michael/.composer/vendor/drush/drush/includes/command.inc:210
PHP   8. call_user_func_array:{/home/michael/.composer/vendor/drush/drush/includes/command.inc:359}() /home/michael/.composer/vendor/drush/drush/includes/command.inc:359
PHP   9. drush_core_pre_site_install() /home/michael/.composer/vendor/drush/drush/includes/command.inc:359
PHP  10. drush_bootstrap() /home/michael/.composer/vendor/drush/drush/commands/core/site_install.drush.inc:197
PHP  11. drush_bootstrap_validate() /home/michael/.composer/vendor/drush/drush/includes/bootstrap.inc:307
PHP  12. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate() /home/michael/.composer/vendor/drush/drush/includes/bootstrap.inc:385
PHP  13. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate_settings_present() /home/michael/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php:317
Drush command terminated abnormally due to an unrecoverable error.                                          [error]
Error: Call to undefined function conf_path() in
/home/michael/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php, line 380

Ubuntu 14.04
PHP 5.6.12-1+deb.sury.org~trusty+1 (cli)

composer create-project drupal-composer/drupal-project:8.x-dev test --stability dev --no-interaction
cd test/web
drush si --db-url=mysql://test:test@localhost/test
You are about to DROP all tables in your 'test' database. Do you want to continue? (y/n): y
PHP Fatal error:  Call to undefined function conf_path() in /home/michael/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php on line 380
PHP Stack trace:
PHP   1. {main}() /home/michael/.composer/vendor/drush/drush/drush.php:0
PHP   2. drush_main() /home/michael/.composer/vendor/drush/drush/drush.php:11
PHP   3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /home/michael/.composer/vendor/drush/drush/drush.php:70
PHP   4. drush_dispatch() /home/michael/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:62
PHP   5. call_user_func_array:{/home/michael/.composer/vendor/drush/drush/includes/command.inc:178}() /home/michael/.composer/vendor/drush/drush/includes/command.inc:178
PHP   6. drush_command() /home/michael/.composer/vendor/drush/drush/includes/command.inc:178
PHP   7. _drush_invoke_hooks() /home/michael/.composer/vendor/drush/drush/includes/command.inc:210
PHP   8. call_user_func_array:{/home/michael/.composer/vendor/drush/drush/includes/command.inc:359}() /home/michael/.composer/vendor/drush/drush/includes/command.inc:359
PHP   9. drush_core_pre_site_install() /home/michael/.composer/vendor/drush/drush/includes/command.inc:359
PHP  10. drush_bootstrap() /home/michael/.composer/vendor/drush/drush/commands/core/site_install.drush.inc:197
PHP  11. drush_bootstrap_validate() /home/michael/.composer/vendor/drush/drush/includes/bootstrap.inc:307
PHP  12. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate() /home/michael/.composer/vendor/drush/drush/includes/bootstrap.inc:385
PHP  13. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate_settings_present() /home/michael/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php:317
Drush command terminated abnormally due to an unrecoverable error.                                          [error]
Error: Call to undefined function conf_path() in
/home/michael/.composer/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php, line 380
@weitzman

This comment has been minimized.

Show comment
Hide comment
@weitzman

weitzman Oct 2, 2015

Member

I did basically that. Just so we all use same version, lets test with drush dl drupal-8.0.0-beta16. Maybe your drush is old? Please go to a tmp dir and run composer require drush/drush:dev-master and make sure you use the new drush. Can anyone else reproduce this bug with latest drush?

Member

weitzman commented Oct 2, 2015

I did basically that. Just so we all use same version, lets test with drush dl drupal-8.0.0-beta16. Maybe your drush is old? Please go to a tmp dir and run composer require drush/drush:dev-master and make sure you use the new drush. Can anyone else reproduce this bug with latest drush?

@weitzman

This comment has been minimized.

Show comment
Hide comment
@weitzman

weitzman Oct 2, 2015

Member

Oh, I had missed that composer line at the top. Thanks for including it. I just ran it and reproduced the problem. The composer.json for drupal-composer/drupal-project says "drush/drush": "8.*",, which downloads drush beta 14. So thats what you are dispatching to. You can verify that:

~/tmp/test/web$ drush --version
 Drush Version   :  8.0.0-beta14

I'd like steps to reproduce from others that are having trouble here.

Member

weitzman commented Oct 2, 2015

Oh, I had missed that composer line at the top. Thanks for including it. I just ran it and reproduced the problem. The composer.json for drupal-composer/drupal-project says "drush/drush": "8.*",, which downloads drush beta 14. So thats what you are dispatching to. You can verify that:

~/tmp/test/web$ drush --version
 Drush Version   :  8.0.0-beta14

I'd like steps to reproduce from others that are having trouble here.

@el22or

This comment has been minimized.

Show comment
Hide comment
@el22or

el22or Oct 2, 2015

I used composer to update Drush composer global update, but now went directly into drush folder and pulled latest master and it works fine.

el22or commented Oct 2, 2015

I used composer to update Drush composer global update, but now went directly into drush folder and pulled latest master and it works fine.

@jasonrsavino

This comment has been minimized.

Show comment
Hide comment
@jasonrsavino

jasonrsavino Oct 2, 2015

i just pulled the latest master and now have Fatal error: Call to undefined function pcntl_exec() in /drupal8/drush/includes/startup.inc on line 256

i just pulled the latest master and now have Fatal error: Call to undefined function pcntl_exec() in /drupal8/drush/includes/startup.inc on line 256

@weitzman

This comment has been minimized.

Show comment
Hide comment
@weitzman

weitzman Oct 2, 2015

Member

composer global update may not be enough depending on how you required drush in the first place. Composer sometimes prefers stable versions and that isn't good enough here (yet - I'm about to tag).

pcntl_exec is in discussion at #1595

Member

weitzman commented Oct 2, 2015

composer global update may not be enough depending on how you required drush in the first place. Composer sometimes prefers stable versions and that isn't good enough here (yet - I'm about to tag).

pcntl_exec is in discussion at #1595

@weitzman weitzman closed this Oct 2, 2015

@adambernstein

This comment has been minimized.

Show comment
Hide comment
@adambernstein

adambernstein Oct 2, 2015

Just confirming that running composer global update as in the last comment fixed this issue for me. Thanks!

Just confirming that running composer global update as in the last comment fixed this issue for me. Thanks!

@jonasdk

This comment has been minimized.

Show comment
Hide comment
@jonasdk

jonasdk Oct 8, 2015

I can confirm that I see the same thing and I have tried a lot of different things - like reinstalling the whole thing and I keep getting this error.
I have done clean install, clean db and have a hard time to come up with more ideas. Anyone else see the same thing?

jonasdk commented Oct 8, 2015

I can confirm that I see the same thing and I have tried a lot of different things - like reinstalling the whole thing and I keep getting this error.
I have done clean install, clean db and have a hard time to come up with more ideas. Anyone else see the same thing?

@alxvallejo

This comment has been minimized.

Show comment
Hide comment
@alxvallejo

alxvallejo Oct 8, 2015

Thanks el22or, running git pull worked for me

Thanks el22or, running git pull worked for me

@jonasdk

This comment has been minimized.

Show comment
Hide comment
@jonasdk

jonasdk Oct 9, 2015

Just to let other who find this tread when googling this issue. I am running drush on a Ubuntu 14.x at Digital Ocean. And I had installed drush more than once both versions identified them self as 8.0.0-dev and hence did't give so much of a clue on where the problem was.

I had installed drush with the apt-get command and with the command that is adviced here http://docs.drush.org/en/master/install/ - but it installs drush two different places and composer update didn't clarify which version was being updated.

What I ended doing was remove .composer from my home directory, and removing drush from

 /usr/local/src

then reinstalling as described under "To install for all users on the server:" on this page http://docs.drush.org/en/master/install/

Then I reinstalled the links to:

 /usr/bin

Now it works like a cham.

PS. Remember that you will need to checkout the proper branch and when you need to update "composer global update" isn't going to help you. To update you will have to go to /usr/local/src/drush and do a git pull

jonasdk commented Oct 9, 2015

Just to let other who find this tread when googling this issue. I am running drush on a Ubuntu 14.x at Digital Ocean. And I had installed drush more than once both versions identified them self as 8.0.0-dev and hence did't give so much of a clue on where the problem was.

I had installed drush with the apt-get command and with the command that is adviced here http://docs.drush.org/en/master/install/ - but it installs drush two different places and composer update didn't clarify which version was being updated.

What I ended doing was remove .composer from my home directory, and removing drush from

 /usr/local/src

then reinstalling as described under "To install for all users on the server:" on this page http://docs.drush.org/en/master/install/

Then I reinstalled the links to:

 /usr/bin

Now it works like a cham.

PS. Remember that you will need to checkout the proper branch and when you need to update "composer global update" isn't going to help you. To update you will have to go to /usr/local/src/drush and do a git pull

@aangelinsf

This comment has been minimized.

Show comment
Hide comment
@aangelinsf

aangelinsf Oct 23, 2015

After removing drush using:
http://drupal.stackexchange.com/questions/135599/how-to-uninstall-drush-via-composer and making sure drush in Acquia Dev Desktop wasn't being called, I installed using:

http://docs.drush.org/en/master/install/
and used the section "Composer - One Drush for all Projects". However, I used the section above "To install for all users on the server".

In that section I found:
composer global require drush/drush:dev-master --prefer-source

This got me the master branch and presumably keeps the ability to use composer global update.

Drush is working fine now.

After removing drush using:
http://drupal.stackexchange.com/questions/135599/how-to-uninstall-drush-via-composer and making sure drush in Acquia Dev Desktop wasn't being called, I installed using:

http://docs.drush.org/en/master/install/
and used the section "Composer - One Drush for all Projects". However, I used the section above "To install for all users on the server".

In that section I found:
composer global require drush/drush:dev-master --prefer-source

This got me the master branch and presumably keeps the ability to use composer global update.

Drush is working fine now.

@rakesh-james

This comment has been minimized.

Show comment
Hide comment
@rakesh-james

rakesh-james Nov 17, 2015

composer global update works for me...:D

composer global update works for me...:D

@xq42

This comment has been minimized.

Show comment
Hide comment
@xq42

xq42 Nov 21, 2015

I seem to be running into this issue as well and I cannot debug it of my own. I don't really understand what I'm looking at, so if what I include below isn't what is necessary to help out, just let me know how to get what you need and I'll post it.

Here's the error I get when running "drush cr"

dan@opus:~/xq42/Sites/xq42.com$ dcr PHP Fatal error: Call to undefined function conf_path() in /home/dan/.drush-versions/drush8/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php on line 383 PHP Stack trace: PHP 1. {main}() /home/dan/.drush-versions/drush8/vendor/drush/drush/drush.php:0 PHP 2. drush_main() /home/dan/.drush-versions/drush8/vendor/drush/drush/drush.php:11 PHP 3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /home/dan/.drush-versions/drush8/vendor/drush/drush/drush.php:70 PHP 4. drush_bootstrap_to_phase() /home/dan/.drush-versions/drush8/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:54 PHP 5. drush_bootstrap_validate() /home/dan/.drush-versions/drush8/vendor/drush/drush/includes/bootstrap.inc:450 PHP 6. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate() /home/dan/.drush-versions/drush8/vendor/drush/drush/includes/bootstrap.inc:411 PHP 7. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate_settings_present() /home/dan/.drush-versions/drush8/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php:325 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Call to undefined function conf_path() in /home/dan/.drush-versions/drush8/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php, line 383

Local system is Ubuntu 14.04.3 lts
Code is result of git clone from a Pantheon site
Local drush version = 8.0-dev
Drupal core = 8.0.0

I'm completely stymied - any help will be much appreciated. Thanks!

xq42 commented Nov 21, 2015

I seem to be running into this issue as well and I cannot debug it of my own. I don't really understand what I'm looking at, so if what I include below isn't what is necessary to help out, just let me know how to get what you need and I'll post it.

Here's the error I get when running "drush cr"

dan@opus:~/xq42/Sites/xq42.com$ dcr PHP Fatal error: Call to undefined function conf_path() in /home/dan/.drush-versions/drush8/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php on line 383 PHP Stack trace: PHP 1. {main}() /home/dan/.drush-versions/drush8/vendor/drush/drush/drush.php:0 PHP 2. drush_main() /home/dan/.drush-versions/drush8/vendor/drush/drush/drush.php:11 PHP 3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /home/dan/.drush-versions/drush8/vendor/drush/drush/drush.php:70 PHP 4. drush_bootstrap_to_phase() /home/dan/.drush-versions/drush8/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:54 PHP 5. drush_bootstrap_validate() /home/dan/.drush-versions/drush8/vendor/drush/drush/includes/bootstrap.inc:450 PHP 6. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate() /home/dan/.drush-versions/drush8/vendor/drush/drush/includes/bootstrap.inc:411 PHP 7. Drush\Boot\DrupalBoot->bootstrap_drupal_site_validate_settings_present() /home/dan/.drush-versions/drush8/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php:325 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Call to undefined function conf_path() in /home/dan/.drush-versions/drush8/vendor/drush/drush/lib/Drush/Boot/DrupalBoot.php, line 383

Local system is Ubuntu 14.04.3 lts
Code is result of git clone from a Pantheon site
Local drush version = 8.0-dev
Drupal core = 8.0.0

I'm completely stymied - any help will be much appreciated. Thanks!

@xq42

This comment has been minimized.

Show comment
Hide comment
@xq42

xq42 Nov 21, 2015

OK, following the instructions at the very top of this page (http://docs.drush.org/en/master/install/), I've installed what turns out to be drush version 8.0.0-rc3 and calling that version directly works as expected.

However, that doesn't update the version I had installed using composer. I'd like to simply update that version, but I haven't yet figured out how to do that. I'll keep looking for that answer, but if anyone can point me to instructions for that process that'd be great.

If I find the info on my own I'll of course post here right away. Hopefully I'll figure this out before anyone spends (more) time on it... :)

And, thanks to greg.1.anderson for getting me started in the right direction (in a different thread)!

Dan

xq42 commented Nov 21, 2015

OK, following the instructions at the very top of this page (http://docs.drush.org/en/master/install/), I've installed what turns out to be drush version 8.0.0-rc3 and calling that version directly works as expected.

However, that doesn't update the version I had installed using composer. I'd like to simply update that version, but I haven't yet figured out how to do that. I'll keep looking for that answer, but if anyone can point me to instructions for that process that'd be great.

If I find the info on my own I'll of course post here right away. Hopefully I'll figure this out before anyone spends (more) time on it... :)

And, thanks to greg.1.anderson for getting me started in the right direction (in a different thread)!

Dan

@greg-1-anderson

This comment has been minimized.

Show comment
Hide comment
@greg-1-anderson

greg-1-anderson Nov 21, 2015

Member

Try composer remove drush/drush (or composer --global remove drush/drush, as appropriate) if you'd just like to get rid of the composer-installed Drush.

Also, note that if you have a site-local Drush installed with Drupal, then it will always be called, so if you have installed Drupal and Drush together via Composer, then make sure that Drush is up to date (composer update).

Member

greg-1-anderson commented Nov 21, 2015

Try composer remove drush/drush (or composer --global remove drush/drush, as appropriate) if you'd just like to get rid of the composer-installed Drush.

Also, note that if you have a site-local Drush installed with Drupal, then it will always be called, so if you have installed Drupal and Drush together via Composer, then make sure that Drush is up to date (composer update).

@xq42

This comment has been minimized.

Show comment
Hide comment
@xq42

xq42 Nov 21, 2015

Greg-

Thanks! I'm still not fully getting how things are "supposed" to work w/Drupal 8 (like many folks I suspect), but now that I've got a working version of drush 8 and can get things done using a workflow I understand, I can take my time figuring out all the new ways... :)

I really appreciate the help,
Dan

xq42 commented Nov 21, 2015

Greg-

Thanks! I'm still not fully getting how things are "supposed" to work w/Drupal 8 (like many folks I suspect), but now that I've got a working version of drush 8 and can get things done using a workflow I understand, I can take my time figuring out all the new ways... :)

I really appreciate the help,
Dan

@nkgokul

This comment has been minimized.

Show comment
Hide comment
@nkgokul

nkgokul Feb 13, 2016

composer global update works for me as well.

nkgokul commented Feb 13, 2016

composer global update works for me as well.

@dsteplight

This comment has been minimized.

Show comment
Hide comment
@dsteplight

dsteplight Apr 26, 2016

composer global update worked for me too

composer global update worked for me too

@nerdstein

This comment has been minimized.

Show comment
Hide comment
@nerdstein

nerdstein Mar 24, 2017

I was able to reproduce this bug with 8.1.10 and attempting the steps above did not resolve.

I was able to reproduce this bug with 8.1.10 and attempting the steps above did not resolve.

@nerdstein

This comment has been minimized.

Show comment
Hide comment
@nerdstein

nerdstein Mar 24, 2017

After further investigation, my environment was not fully bootstrapped. It suggests we should have some additional checks in this instance so the fatal error is not thrown but a more appropriate error message is generated

After further investigation, my environment was not fully bootstrapped. It suggests we should have some additional checks in this instance so the fatal error is not thrown but a more appropriate error message is generated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment