phpsymfony

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


$ cd my_project_name/
$ php bin/console server:run

When I added following commands and tried to run my symfony application this error comes,

"Error:Could not open input file: bin/console"


Solution

  • 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