Closed (fixed)
Project:
Drush
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Sep 2008 at 14:03 UTC
Updated:
22 Sep 2008 at 15:29 UTC
[com***@mule modules]$ drush pm install token
Parse error: syntax error, unexpected T_VARIABLE in /var/www/html/sites/all/modules/drupalforfirebug/drupalforfirebug_preprocess.module on line 30
[com****@mule modules]$
I get errors like this for lots of modules. Before I installed the DFF module, it was only happening in modules I had written myself, in /sites/default/modules, but disabling these fixes it. However, there is nothing wrong with any of these modules and I cannot explain why this is happening.
Suffice to say it breaks Drush quite horribly, as I can't use a lot of the functionality.
Comments
Comment #1
moshe weitzman commentedThe error discusses a parse error in DFF in /drupalforfirebug_preprocess.module on line 30. Your first step is to fix the parse error. I don't think this is related to drush.
Comment #2
niklp commentedI will double check, but my point was more related to the fact that it happens with *lots* of modules. All of these modules work perfectly normally other than they cause this particular error under drush.
A parsing error of this nature would cause php to fatal under normal circumstances for this particular module's error ... right? But it works perfectly otherwise. Unless there is something I'm missing about parsing errors...
Comment #3
clemens.tolboomHave you checked your watchdog log ... my guess this is filled with errors?
Using drush will show these errors immediate but on your website you have to check watchdog or set the error level with devel module different.
Comment #4
Frando commentedAlso, check if your CLI's ph is the same version as your webserver's. Maybe you're having PHP 4.x running on the command line, and 5 on the webserver and therefore getting parse errors for php5-only code in modules.
Comment #5
niklp commentedThat's an awesome point, which I'd never have thought of.
A simple "php -v" on the CLI reveals the following:
Awesome. How do I make the CLI use php 5 tho...?
Comment #6
Frando commentedDepends on your system/distribution, I'd say.
On Debian and relatives there's a package php5-cli IIRC.
Comment #7
Frando commentedComment #8
niklp commentedThe answer turned out to be pretty simple, and took me about 4 seconds to test and half a minute to implement...
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
niklp commentedI should say that I changed the hash bang line in drush.php to point to the other version of php5 - this works, but I get a lot of "headers already sent" errors... :/