简体   繁体   中英

Symfony Deploying Project on Distant Server ContextErrorException

I am trying to upload my project on the distant server, I simply uploaded the files on the distant server, checked the config.php, which says that all is good. I have removed the if conditions for only local access. But when i try to open the app_dev.php or app.php i keep getting this error

  ContextErrorException: Warning: 
        file_get_contents(C:\wamp2\www\Symfony\src\Les\CouvertsBundle/Resources/views/Couverts/index.html.twig)
        : failed to open stream: No such file or directory 
        in /homepages/26/d367595533/htdocs/Symfony/vendor/twig/twig/lib/Twig/Loader/Filesystem.php line 130

i have not found any answers to this question, maybe not looking for it properly. But could anyone explain to me why would this error is occuring? Why is symfony looking for the files with the local address?

I followed this tutorial to deploy project in production http://fr.openclassrooms.com/informatique/cours/developpez-votre-site-web-avec-le-framework-symfony2/deployer-son-site-symfony2-en-production . The steps seem pretty straight forward, but maybe i am missing something.

This is really frustrating, because my project is ready but i can't seem to put it online due to this problem.

The problem seemed to be the command php app/console cache:clear and php app/console cache:clear --env=prod didn't completely clear the cache folder.

It can happen if the user running the command hasn't the permission to delete files/folder in app/cache/ Manually removing the content of this folder can solve the issue ( rm -rf app/cache/* ).

只需在(projectname / app / cache)手动清除缓存,而不是为我工作的命令行(版本2.8)。

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