I'm trying to execute some PHP code, but I keep getting syntax errors.

drush eval \"db_rename_table(array(), 'actions_old_contrib', 'actions_old_contrib_copy');\"

results in

Parse error: syntax error, unexpected $end in path\to\drush\commands\core\core.
drush.inc(547) : eval()'d code on line 1

The example from the help gets the same error.

drush eval \"variable_set('hello', 'world');\"

// Other variation
drush eval \"variable_set('hello', 'world')\"

Strangely, this works

drush eval phpinfo()

I'm doing this on Windows XP.

Comments

moshe weitzman’s picture

Category: support » bug
moshe weitzman’s picture

Status: Active » Fixed

Fixed help text. Was escaping too much.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.