I just installed drush on my godaddy server and went to run drush up on one of my drupal installations and received the following:

[metrolocorg@p3nlhssl048 sandbox]$ drush up
The external command could not be executed due to an application     [error]
error.
The command could not be executed successfully (returned:            [error]
Content-type: text/html

<br />
<b>Parse error</b>:  syntax error, unexpected '{' in
<b>/home/content/m/e/t/metrolocorg/html/dev/drush/includes/environment.inc</b>
on line <b>518</b><br />
, code: <em class="placeholder">255</em>)
Update information last refreshed: Wed, 04/04/2012 - 14:35

Update status information on all installed and enabled Drupal projects:
 Name      Install  Propose  Status
           ed       d
           version  version
 Administ  7.x-3.0  7.x-3.0  Up to date
 ration    -rc1     -rc1
 menu
 (admin_m
 enu)
 Backup    7.x-2.2  7.x-2.2  Up to date
 and
 Migrate
 (backup_
 migrate)
 Backup    7.x-1.x  7.x-1.x  Up to date
 and       -dev     -dev
 Migrate
 Dropbox
 (backup_
 migrate_
 dropbox)
 Backup    7.x-1.x  7.x-1.x  Up to date
 and       -dev     -dev
 Migrate
 Files
 (backup_
 migrate_
 files)
 Drupal    7.12     7.12     Up to date
 Chaos     7.x-1.0  7.x-1.0  SECURITY UPDATE available
 tools     -rc1
 (ctools)
 Demonstr  7.x-1.0  7.x-1.0  Up to date
 ation
 site
 (demo)
 google_a  7.x-1.2  7.x-1.2  Up to date
 nalytics
 Module    7.x-1.6  7.x-1.6  Up to date
 filter
 (module_
 filter)
 Referenc  7.x-2.0  7.x-2.0  Up to date
 es
 (referen
 ces)
 Omega     7.x-3.0  7.x-3.0  Up to date
 Tools     -rc4     -rc4
 (omega_t
 ools)
 Pathauto  7.x-1.0  7.x-1.0  Up to date
 (pathaut
 o)
 Token     7.x-1.0  7.x-1.0  Up to date
 (token)   -rc1     -rc1
 Views     7.x-3.3  7.x-3.3  Up to date
 (views)
 Omega     7.x-3.1  7.x-3.1  Up to date
 (omega)



Security updates will be made to the following projects: Chaos tool suite (ctools) [ctools-7.x-1.0]

Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
Project ctools was updated successfully. Installed version is now 7.x-1.0.
Backups were saved into the directory                                [ok]
/home/content/m/e/t/metrolocorg/drush-backups/met1206501322747/20120404212027/modules/ctools.
The external command could not be executed due to an application     [error]
error.
The command could not be executed successfully (returned:            [error]
Content-type: text/html

<br />
<b>Parse error</b>:  syntax error, unexpected '{' in
<b>/home/content/m/e/t/metrolocorg/html/dev/drush/includes/environment.inc</b>
on line <b>518</b><br />
, code: <em class="placeholder">255</em>)
Backups were restored successfully.  

Any ideas?

Thanks.

Laurie

Comments

Jovean’s picture

For what it's worth, I get the same error text for any drush command (ie., drush help, or drush dl somemodule.)

urbanlegend’s picture

subscribe

david.newcomb’s picture

Having the same issue, subscribing.

david.newcomb’s picture

Just realized this was closed, and I fixed the issue.

snap4417’s picture

I am having the same issue. How was this fixed? Thanks

Never mind, I fixed it. Someone messed with the .bashrc file. Works with this in .bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific aliases and functions
export COLUMNS
alias drush='/usr/local/php5/bin/php ~/drush/drush.php --php=/usr/local/php5/bin/php'
alias php='/usr/local/php5/bin/php'

barronshores’s picture

I have installed Drush on GoDaddy with this .bashrc file:

# User specific aliases and functions

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

export DRUSH_PHP='user/local/php5/bin/php'
export COLUMNS
alias drush='/usr/local/php5/bin/php ~/drush/drush.php --php=/usr/local/php5/bin/php'
# alias drush='/usr/local/php5/bin/php  ~/html/drush/drush.php'
alias php='/usr/local/php5/bin/php'

When I run drush up I get the following error that prevents me from updating the core from 7.12 to 7.14:

Code updates will be made to drupal core.
WARNING: Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt. If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file.
Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing.

Do you really want to continue? (y/n): y
Project drupal was updated successfully. Installed version is now 7.14.
Backups were saved into the directory [ok]
/drupal.
Content-type: text/html

Parse error: syntax error, unexpected '{' in /drush/includes/environment.inc on line 517
The external command could not be executed due to an application error. [error]
[error]turned: Content-type: text/html

Parse error: syntax error, unexpected '{' in /drush/includes/environment.inc on
line 517
, code: 255)
Backups were restored successfully.

Not sure how to get this working. Please help.

jonhattan’s picture

export DRUSH_PHP='user/local/php5/bin/php' seems wrong.

agence web coheractio’s picture

Version: » 7.x-5.8

Adding export DRUSH_PHP="/usr/local/bin/php5" into.bashrc solved the problem on my side

Laurent
Agence Web Paris Coheractio

drupalfever’s picture

I used the following on my ".profile" in my GoDaddy Shared Hosting account and I was able to upgrade my Drupal core from version 7.22 to 7.23.

export DRUSH_PHP='/usr/local/php5/bin/php'
export COLUMNS
alias drush='/usr/local/php5/bin/php ~/drush/drush.php --php=/usr/local/php5/bin/php'
alias php="/usr/local/php5/bin/php"