简体   繁体   中英

symfony2 cygwin cli php commands error

When I try to run a symfony console php command (generate:bundle, etc) in cygwin, I get an error similar to:

[Symfony\\Component\\Debug\\Exception\\ContextErrorException] Warning: file_get_contents(E:/xampp/htdocs/foo_com/app/config/parameters.yml): failed to open stream: No such file or directory in /cygdrive/e/xampp/htdocs/foo_com/vendor/symfony/symfony/src/Symfony/Component/Yaml/Yaml.php line 61

If I delete the app/cache folder, I can run the app/console commands without any issues, until I access my page in the browser. Once I access my page in the browser I start to get this error again.

Try to do the following: (assuming that you run windows 7):

  • run cygwin\\bin\\dash.exe as administrator
  • /usr/bin/rebaseall -v
  • run cygwin.bat as administrator

In my case it solved this problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM