CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • drush civi question
Pages: [1]

Author Topic: drush civi question  (Read 845 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
drush civi question
May 13, 2010, 04:39:03 am
I tried posting this on Drupal IRC but no response yet & I am turning into a pumpkin so I think I'd better post it here instead. (not implying that I waited a long time for a response & didn't get one - just that I need sleep)

My civi drush install command fails because it can't find the civicrm codebase. The codebase is in  sites/all/modules but it is looking in sites/sitename/modules

The variable that is in question is $siteRoot:
 $siteRoot   = drush_get_context('DRUSH_DRUPAL_SITE_ROOT', FALSE);
 $modPath    = "$drupalRoot/$siteRoot/modules";

So, I guess the question is where does DRUSH_DRUPAL_SITE_ROOT come from?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

torenware

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 4
Re: drush civi question
May 25, 2010, 09:15:20 pm
Eileen,

I don't know if this is a standard way to do this, but here's what I find works for me.

Using Drush v.3,  I call drush via wrapper scripts that look like this:
Code: [Select]
#! /bin/bash
#export XDEBUG_CONFIG="remote_port=9000 remote_enable=1"
DRUP_INSTALL=/home/production/sites/demdata_v2/phase1
DRUSH_INSTALL=/home/production/sites/demdata_v2
exec $DRUSH_INSTALL/drush/drush.php -l  https://migrate -r $DRUP_INSTALL $@

DRUP_INSTALL points to my drupal install directory (i.e., where index.php lives).  Drush itself is not in the Drupal tree, but is at DRUSH_INSTALL/drush/.  Note also the -l argument to the drush.php command, which you need to worry about if you use apache name-based hosting and Drupal's own multisite capabilities, as I do.  Getting -l right makes sure that Drush uses the correct settings.php and civicrm.settings.php files.

Note also I have commented out XDEBUG_CONFIG, which if you use an xdebug based source code debugger, can be very handy.  I can actually debug stuff from the command line by uncommenting this, which is bloody handy.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • drush civi question

This forum was archived on 2017-11-26.