Could not open input file app/console

后端 未结 9 2666
故里飘歌
故里飘歌 2021-02-18 22:54

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 --nam         


        
相关标签:
9条回答
  • 2021-02-18 23:02

    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

    0 讨论(0)
  • 2021-02-18 23:09

    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.

    0 讨论(0)
  • 2021-02-18 23:10

    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.

    0 讨论(0)
  • 2021-02-18 23:11

    For newer versions of Symfony (2.4.x or newer) use this method on windows to resolve the problem:

    1. Go to project directory e.g. d:/xampp/symfony2-project/ and open composer.json and place this under requires array "symfony/console": "2.4.*@dev". And save the file.
    2. Open command-line and cd to project's directory.
    3. Use this command to let download and install the dependencies: 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.
    4. Now you are all done, just use php bin/console generate:bundle --namespace=Test/PrintBundle --format=yml
    0 讨论(0)
  • 2021-02-18 23:13

    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

    0 讨论(0)
  • 2021-02-18 23:18

    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

    0 讨论(0)
提交回复
热议问题