Abonnez-vous pour accéder à nos tutoriels, nos conseils, et aux informations sur notre programme de formation.
Did you have trouble following our instructions for getting Drupal Console running on Windows? Did something unexpectedly go wrong? Look for a section on this page corresponding to the command-line output you saw, and it might help!
If this still doesn't help, let us know! Email, or leave a comment on the blog post. Please point us to a Gist containing the complete log of what happened at the command-line, so we can diagnose the problem, and update our instructions.
This package requires PHP >=5.5.9
Problem 1 - This package requires php >=5.5.9 but your PHP version (5.4.45) does not satisfy that requirement.
This means you're using the wrong version of PHP. Some ways this could happen:
- You forgot to set the PHP version for your site in DevDesktop. Change the PHP version, and open a new command-line.
You ran another command that modified your command-line environment. Even running "drush" can cause this to happen! Open a new command-line and you should be fine.
Because of this, we recommend you reserve one command-line window just for Drupal Console. If you need to use other tools, run them in another window.
- You're using a different command-line entirely, for example one from Git. These instructions all assume you use a command-line properly configured for Drupal, which you can get by clicking the little console button in Dev Desktop.
PHP Parse error
"PHP Parse error: syntax error, unexpected '[' in C:\Users\Dave\Sites\devdesktop\d8\vendor\drupal\console\bin\drupal.php on line 14"
This also means you have the wrong version of PHP. See above.
Could not open input file
"Could not open input file: composer.phar"
This means you haven't edited the composer.bat file. Fix it.
Your requirements could not be resolved
Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for drupal/console >=1.0-rc15 -> satisfiable by drupal/console[1.0.0-rc15]. - drupal/console 1.0.0-rc15 requires drupal/console-core 1.0.0-rc15 -> satisfiable by drupal/console-core[1.0.0-rc15] but these conflict with your requirements or minimum-stability. Installation failed, deleting ./composer.json.
This can mean that you're not running Drupal 8, but Drupal 7! Drupal Console only works in Drupal 8.
The system cannot find the path specified
The system cannot find the path specified
Dev Desktop installs by default in
C:\Program Files (x86)\DevDesktop, but this may indicate that you have it installed it at a different path. Adjust all the instructions to use your actual Dev Desktop path.
You can find your Dev Desktop installation path by typing
where drush, and then removing
tools\drush.bat from the end. For example, if the command prints
E:\DevDesktop\tools\drush.bat, your Dev Desktop path is
Command site:status is not a valid command
[ERROR] Command "site:status", is not a valid command name.
This could mean the current directory of your command-line shell is not inside a Drupal site directory. If you type
dir, do you see a file update.php? If not, you'll need to change directory to the right place—or just open up a brand new command-line.
Another possibility is that your Drupal site is not fully installed. Did you run through the install.php process, where you give the site a name and email address? If not, go visit the site in your browser and finish the install process.
The specified database connection is not defined
[ERROR] The specified database connection is not defined: default
This means Drupal Console can't figure out where your database settings live. Make sure you have installed a very recent version of Drupal Console, at least 1.0-rc15. You can check with
'drupal' is not recognized
'drupal' is not recognized as an internal or external command, operable program or batch file.
This means the Drupal Console Launcher is not properly installed. Install it.
php is not recognized
'php' is not recognized as an internal or external command, or
'composer' is not recognized as an internal or external command, or
php: command not found, or similar.
This probably means you're using the wrong command-line—maybe the one that came with Windows, or with Git. These instructions all assume you use a command-line properly configured for Drupal, which you can get by clicking the little console button in Dev Desktop.
Drupal Console is not installed
[ERROR] Drupal Console is not installed at: ...
The current site doesn't have Console installed. This could be because something went wrong when you ran composer to install Console—look at that error message for more details. It could also be that Console installed fine, once—but this is a second site. You have to install Console in every single site!