Reputation: 1699
I installed wamp server and a copy of the Symfony2 framework. I am trying to create a Bundle, using the following command:
php app/console generate:bundle --nampespace=IDP/IDP_Bundle --format=yml
My PHP is in C:/wamp/bin/php/php5.3.10
But when I run the command it says:
could not open input file app/console
Can anyone tell me what is going wrong?
Upvotes: 23
Views: 72380
Reputation: 407
It is also possible that you have the line :
//umask(0000);
in your /web
file, app_dev.php
.
If after doing :
php app/console generate:bundle --nampespace=IDP/IDP_Bundle --format=yml
in your project path, you still can not generate your bundle, try uncommenting the unmask line. It worked for me.
Upvotes: 0
Reputation: 1681
I got the same issue when installing the pear library
my issue was, when downloading the go-pear.phar file, it downloads as the (.txt) extension which i didn't see.
jst change the file extension to .phar and run the code
Upvotes: 0
Reputation: 2194
I'm use Symfony 3 and the Bundle calendar-bundle. This error is present in the documentation of: Bundle: https://github.com/adesigns/calendar-bundle
The form correct is:
php bin/console assets:install web
Regards
Upvotes: 3
Reputation: 102
First check the Environment Variable which is in Advanced system setting -> set path of C:/wamp/www/bin/php
and then
run cmd->go to the directory of your project which is in www folder using cd C:/wamp/www/yourproject
use then user php app/console
that shows the all command.
Upvotes: 1
Reputation: 3855
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.
Upvotes: 44
Reputation: 2787
For newer versions of Symfony (2.4.x or newer) use this method on windows to resolve the problem:
"symfony/console": "2.4.*@dev"
. And save the file.php path/to/composer.phar install
. Remember you should be in your project's directory and path/to/composer.phar is the actual path to your composer.phar file.php bin/console generate:bundle --namespace=Test/PrintBundle --format=yml
Upvotes: 8
Reputation: 869
Dont run the command from the php path.
Add php into your path environment variable
and then cd to the project
C:/wamp/www/yourproject
and then run the command
php app/console generate:bundle --nampespace=IDP/IDP_Bundle --format=yml
It will work
Upvotes: 23
Reputation: 1699
Actually You need to be in your project root to run this command and you have to add php directory to your system env path variable.
Upvotes: 3
Reputation: 105888
Sounds like you (i.e., your user) don't have access to read/execute console
. I've never worked with with file permissions on a WAMP stack so I'm not sure what you'll need to do to fix them.
Upvotes: 0