I have installed Symfony2 on a Xampp server with PHP 5.3.8 and everything works ok ( the php, the symfony demo page ).
I try to create my own helloWorld, as the tutorial says :
php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml
I go Start->Run->CMD and put that line of code and it gives me back this :
could not open input file : app/console
I put the PHP directory to the System PATH but the problem persists.
To execute command you should move to root directory of your project in terminal/CMD.
Please note that in version 2.5
some changes has been made so command will not work with app/console
Note: From 2.5 app/console
is replaced by bin/console
.
Please check here for changes. Also check this for more details about difference.
Most probably, you're not in the symfony2 project directory.
- start the windows console as you're doing it (Start->Run->CMD)
- then move to the symfony2 project root directory with the command cd:
"cd c:\htdocs\path\to\your\symfony2\project"
- then run the command from the tutorial
the thing is that the part of the command from the tutorial "app/console" means the path to the "console" script in the "app" directory of the symfony2 project.