2

drush throws an error

"Notice: Use of undefined constant STDERR - assumed 'STDERR' in /kunden/192766_10587/bin/drush/includes/drush.inc on line 1668

Warning: fwrite(): supplied argument is not a valid stream resource in /kunden/192766_10587/bin/drush/includes/output.inc on line 34

What I did is the following. (I followed the instruction from the README.)

  1. Cloned drush

    git clone --branch 7.x-5.x http://git.drupal.org/project/drush.git
    
  2. Wrote into the ~/.bashrc

    export PATH="$PATH:~/bin/drush:/usr/local/bin"
    alias drush=~/bin/drush/drush.php
    
  3. Refreshed the bashrc

    source ~/.bashrc
    
  4. Set the 'drush' command executable:

     chmod u+x /path/to/drush/drush
    

Drush is working but it shows errors every time.

What did I do wrong?

  • If you solved your query consider posting the solution as an answer and approve it as correct answer. – niksmac Jan 16 '14 at 14:38
1

You should not run drush.php directly. It is preferable to define DRUSH_PHP, like this: export DRUSH_PHP='/usr/local/bin/php' Then you may continue to use the drush script as usual. This is documented in the README.

  • I have the same problem, with your answer i can resolved this with drush, but for this way. export COLUMNS alias drush='/usr/local/bin/php ~/drush/drush.php --php=/usr/local/bin/php' alias php='/usr/local/bin/php' – jonathan Apr 28 '17 at 17:50

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