Closed (duplicate)
Project:
Drush
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Sep 2008 at 19:15 UTC
Updated:
23 Sep 2008 at 21:07 UTC
Greetings! I'm not entirely sure that this is a bug, but I ran into some problems installing Drush on D7 HEAD. I kept getting the following fatal error:
PHP Warning: require_once(DRUPAL_ROOT/includes/cache.inc): failed to open stream: No such file or directory in /var/www/html/includes/bootstrap.inc on line 1009
PHP Fatal error: require_once(): Failed opening required 'DRUPAL_ROOT/includes/cache.inc' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/includes/bootstrap.inc on line 1009
The only way I could fix the problem was to explicitly define DRUPAL_ROOT in drush.php:
--- drush.php 2008-08-28 05:16:57.000000000 -0400
+++ drush.php 2008-09-23 13:03:03.000000000 -0400
@@ -84,6 +84,7 @@ function drush_bootstrap($argc, $argv) {
// If no root is defined, we try to guess from the current directory.
define('DRUSH_DRUPAL_ROOT', drush_get_option(array('r', 'root'), _drush_locate_root()));
+ define('DRUPAL_ROOT', DRUSH_DRUPAL_ROOT);
// If the Drupal directory can't be found, and no -r option was specified,
// or the path specified in -r does not point to a Drupal directory,
The current working directory was correct for the drupal root, but since D7 defines DRUPAL_ROOT in index.php, it wasn't getting set in the _drush_bootstrap_drupal() function.
Perhaps it's a bit premature to make note of this, but hopefully it helps :)
Kevin
Comments
Comment #1
kevin hankens commentedAdded "Drush" in title for clarity
Comment #2
moshe weitzman commentedTrying to get this addressed in core - http://drupal.org/node/259623#comment-1026200
Comment #3
kevin hankens commentedOops, missed that one, marking as duplicate :)
I agree, it seems like it should definitely be handled in core.
BTW, do you need any help with updating the SQL functions to use the new database variables?
Comment #4
moshe weitzman commentedYes - help please. All good idea welcome, in all parts of drush.
Comment #5
moshe weitzman commentedI committed this just to keep the module working. Thanks.