Unable to run drush php command on Drupal 7 site | Acquia Product Documentation
Cloud Platform
Unable to run drush php command on Drupal 7 site
Unable to run drush php command on Drupal 7 site
Date Published: March 15, 2022
Issue
When attempting to run selected drush php commands on Drupal 7 site the command errors.
Example
/var/www/html/[sitename.env]/docroot$ drush php
Symfony\Component\Console\Exception\InvalidArgumentException: Command name "" is invalid. in [error]
...
Resolution
Use the drush7 executable to run the commands successfully against your Drupal 7 site, this is because drush8 is the default drush used.