I ran drush cc all and it produced the following output:
X-Powered-By: PHP/5.2.3
Set-Cookie: SESSc21f969b5f03d33d43e04f8f136e7682=540794e3bf793531b8de7288ff4f4d3f; expires=Thu, 15 Dec 2011 21:36:40 GMT; path=/
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Tue, 22 Nov 2011 18:03:20 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Content-Type: text/html; charset=utf-8
<br />
<b>Warning</b>: fwrite(): supplied argument is not a valid stream resource in <b>xxx/.drush/drush/includes/drush.inc</b> on line <b>576</b><br />
<br />
<b>Warning</b>: fwrite(): supplied argument is not a valid stream resource in <b>xxx/.drush/drush/includes/drush.inc</b> on line <b>576</b><br />Also a drush status produces the following output:
drush status
X-Powered-By: PHP/5.2.3
Content-type: text/html
Drush version : 4.5
Drush configuration :
Drush alias files :
Environment:
Red Hat Enterprise Linux ES release 4 (Nahant Update 9)
PHP 5.2 (as CGI)
Seems like the headers are being outputted into the commands.
Comments
Comment #0.0
chrisjlee commentedReorganize Page
Comment #1
greg.1.anderson commentedDrush does not support php-cgi; run it under php-cli.
Comment #3
koppie commentedI just wandered onto this thread and I suspect others will too. Greg was right, you need to use PHP CLI, but he didn't say how to do it. For anyone else who was as confused as me, this is what you need to put in .bash-profile (or .bashrc):
Comment #4
chrisjlee commentedAh thanks @koppie i didn't know how to do that either.
Comment #5
greg.1.anderson commented#3 was fine for drush-2 and drush-3, but is not recommended for drush-4 or later. You should always run the
drushscript to run current versions of Drush.drush-4 and later will respect the environment variable DRUSH_PHP, and will use the php executable that it represents. Therefore, you should instead put something like the following in our .bash-profile or .bashrc:
Read
man bash, or search google if you need information on configuring your shell.Comment #6
greg.1.anderson commentedComment #7.0
(not verified) commentedfix page