"Could not open input file: bin/console" Error comes when try to Run the Symfony Application

As @chapay and @cered says we can use this command instead.

php app/console server:run

Its Symfony 2 command and the one I had problems with is Symfony 3 command. And I found out few other times also this issue comes.

for sometimes we can replace 'bin' with 'app'. like,

php bin/console doctrine:mapping:import --force AcmeBlogBundle xml
php app/console doctrine:mapping:import --force AcmeBlogBundle xml

And if not we can choose the correct command in 'http://symfony.com/doc/' site by changing the version.

enter image description here


The file app/console was moved to bin/console in Symfony 3. So instead of running

php bin/console server:run      #valid in Symfony 3

Try running:

php app/console server:run      #valid in Symfony 2

Before to use this command make sure you installed dependencies from composer.json
Run:

composer update

Tags:

Php

Symfony