Symfony2 Composer Install

前端 未结 4 2003
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-13 13:20

I am trying to install Symfony 2.1.3 (latest). I am running composer and installs everything okay. The only error that I get is:

Script Sens         


        
相关标签:
4条回答
  • 2021-01-13 13:53

    I had this same issue for a while and after hours of face to brick wall pounding I realized... I have a .gitmodule in my project, and on initial checkout these submodules are NOT initialized and as such are not there for your composer to update, which results in the above error.

    Make sure you run the following

    git submodule update --init src/Acme/Sadness/Bundle
    

    of course replace src/Acme/Sadness/Bundle with YOUR project namespace.

    Hope this helps someone not go through the same pain I just did.

    0 讨论(0)
  • 2021-01-13 13:58

    Apache is not related - PHP is called via command line.

    Most likely is the permission in the cache folder: did you check if the user that runs the composer update can actually write the cache folder?

    Try to manually run rm -Rf app/cache/dev (for production environment replace dev with prod) and see if you get any permission error.

    Also you will get this error if the default.timezone setting is not configured in php when running in CLI. To verify just run

    php --info | grep timezone

    and check that the setting date.timezone is correctly configured.

    On the security side, setting 777 to the folder is not the optimal solution - if you have ACL enabled you could use that to correctly set up the permission for the cache and logs folder. Read more at the Symfony2 official installation page

    0 讨论(0)
  • 2021-01-13 13:58

    If you have vendor folder already I would remove it and install symfony 2.1.3 again via "composer.phar install". Problem might be coming from outdated version of composer

    0 讨论(0)
  • 2021-01-13 14:11

    I had the same problem and I resolve in this way.

    execute this on the console and you should see something like this

    $ locate php.ini
    /etc/php5/apache2/php.ini
    /etc/php5/cli/php.ini
    /etc/php5/fpm/php.ini
    

    the first line is probably your php.ini that appear when you do a phpinfo();

    the problem is that when you execute composer update this no check the same php.ini

    in my case the second line

    all my sites work fine but always I had problems not now after edit the second file and put the same time zone that you set in the first one

    run

    $ sudo service apache2 reload
    

    and now

    $ composer update
    

    I hope that this work for you like work for me

    regards Emiliano

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