I used drush to update my Drupal 6 sites but it fails on my Drupal 7 site.

drush updatestatus works fine
but drush updatecode fails with:

'update via drush: "Illegal string offset 'site' backend.inc:1030"'

I used drush 7 and then updated composer and installed drush 8: each time the result was exactly the same.
I am a newcomer to drush.

Please help.

Comments

Nikita Petrov’s picture

I had this problem too. Solution: You simply have an old php version (e.g. 5.2). Just update it to at least 5.3.3 version.

david.hughes’s picture

I'm encountering this issue with drush running on PHP 5.6.12 so I'm not convinced it's the PHP version.

c-c-m’s picture

Same here, and I am also using php 5.6

Charis.Yfantis’s picture

I'm using plesk 12.5.30 with multiple php versions.

I have set the following alias in my ~/.bashrc file
alias drush='/opt/plesk/php/5.6/bin/php /usr/local/bin/drush'

and the result(s) is/are

Illegal string offset 'site' backend.inc:1037

or/and (different commands give different result(s))

The command could not be executed successfully (returned: PHP Parse error: syntax error, unexpected '[' in phar:///usr/local/bin/drush/includes/startup.inc on line 63
, code: 255)

fugazi’s picture

have the same problem with php 5.6
there are here already approaches to solutions

Sam Moore’s picture

Just because your site is using PHP 5.6 doesn't mean drush is - typically the CLI version of PHP is set independently to the one used by Apache.
Run drush status to see what PHP executable drush is using.

fugazi’s picture

many thanks for the note exactly where the mistake was. now everything works.