When running "drush entup" or "drush updb" on the remote server only I receive this strange error. On my local servers it works without issues. I tried now several remotes on different machines and receive all the time this error.
I tried with Drupal 8.6.15 and 8.7.1, PHP 7.1 and 7.2.
When using the original non "drupal-project" build from the website I do not encounter this problem.
Here the error that I receive:
`The command "/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php updatedb:status --no-entity-updates --uri=default --root=/www/htdocs/w0196c64/drupal/web" failed.
Exit Code: 2(Misuse of shell builtins)
Working directory:
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 2: ?php: No such file or directory
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 4: use: command not found
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 5: use: command not found
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 6: use: command not found
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 7: use: command not found
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 8: use: command not found
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 9: use: command not found
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 11: /bin: Is a directory
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 12: autoload.php: command not found
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 13: autoload.php: command not found
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 14: autoload.php: command not found
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 15: autoload.php: command not found
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 16: syntax error near unexpected token ('
/www/htdocs/w0196c64/drupal/vendor/drush/drush/drush.php: line 16: * - Set up the environment (record user home directory, cwd, etc.).'`
Other commands, such as drush cr or drush cim seem to work without issues.
Issue can be resolved by downgrading symfony/var-dumper to version 3.4 by running
composer require symfony/var-dumper:^3.4
This works for both plesk and cpanel hosts.
I've faced the issue and downgrading symfony/var-dumper to 3.4 doesn't help.
Your command is wrong. You sould use drush bash script rather than the php file.
./www/htdocs/w0196c64/drupal/vendor/drush/drush/drush updatedb:status --no-entity-updates --uri=default --root=/www/htdocs/w0196c64/drupal/web
@Spooky063
My command was just a simple:
drush updb
This is drush command directly from vendor installed via drupals composer. However when calling the bash script instead of the php file it works. Thanks
I faced something similar today but it was D9 related, it was phpdotenv 5.x: https://github.com/drupal-composer/drupal-project/pull/584 This may help others?
Seems fixed to me. Please reopen if the issue persists. Many thanks 馃檪
Most helpful comment
Your command is wrong. You sould use drush bash script rather than the php file.