Running drush -d status results in this error: Drush command terminated abnormally due to an unrecoverable error. The full output is add below.

Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.12 sec, 7.41 MB]
[bootstrap] Initialized Drupal site default at sites/default [0.12 sec, 7.41 MB]
[notice] Cache HIT cid: 5.7-commandfiles-2-c32acd775c18a90c5b41d0fc9accf5ab [0.13 sec, 7.41 MB]
[debug] Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.13 sec, 7.41 MB] [bootstrap] Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.16 sec, 9.16 MB]
[bootstrap] Successfully connected to the Drupal database. [0.16 sec, 9.16 MB] [bootstrap] Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.17 sec, 9.16 MB]
[bootstrap] Undefined index: sitename domain.module:2922 [1.24 sec, 31.05 MB] [notice] Undefined index: path domain.module:2923 [1.24 sec, 31.05 MB] [notice] Drush command terminated abnormally due to an unrecoverable error. [1.24 sec, 31.06 MB]
[error]

Is there a way to configure a separate php.ini for drush in the .drushrc file or in settings.php, or pass some settings on the drush invocation?

up vote 2 down vote accepted

First, remember that php.ini for Command Line Interface is separate and has nothing to do with php.ini your webserver is using. To find where that file is, follow this question on SO as this is not really on-topic on Drupal Answers.

If you want to set some php.ini values in drushrc.php, you need to use ini_set() PHP function. Just remember that not all values are changeable like that, only the ones with PHP_INI_USER (or PHP_INI_ALL, of course) on this list.

  • Could you reverse the order of the paragraphs? I think most heavy drush users get to find that out sooner or later. I can do it myself if you don't mind. It sort of makes the answer scarier I will ask the additional question at the bottom as a separate question. – vfclists Feb 28 '14 at 12:37
  • 1
    @vfclists I really think that forgetting that there are separate php.ini for all interfaces is mistake made more often. And both paragraphs are so short that I don't think reading them would hurt anyone. If you will suggest edit, I'll not accept or reject it, I'll let other reviewers to decide which way is better. – Mołot Feb 28 '14 at 12:39
  • I think it is better give the direct answer to the question first and add the nota bene afterwards. Without the additional note they will still get their desired result. It makes the process sound more scary than it is and Drupal users comfortable on the command line are likely to need less hand holding when the unexpected arises. They are probably used to such gotchas already. Anyway we all have different opinions on styles of teaching. Thanks for the answer. – vfclists Feb 28 '14 at 13:04

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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