dongxichan8627 2013-10-27 21:44
浏览 66
已采纳

Symfony2:在chroot环境中生产?

As a learning exercise I used Symfony to update an existing application for a local non-profit. Development was in a Windows environment. Now that the application has been installed on their ISP's shared host I start to learn about chroot on a FastCGI server. There are errors such as this:

PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/home/projectmana/www2.projectmana.org/app/logs/prod.log" could not be opened: failed to open stream: No such file or directory' in /www2.projectmana.org/app/cache/prod/classes.php:4823

The ISP responds with:

Bad path. PHP is chrooted in /home/projectmana/.

OK. I get it that this is the problem. Web searches so far have not provided a clue as to how to proceed. (I've gained greater appreciation for Symfony wanting to avoid shared hosting.) Is there a solution that I, a relative novice and a volunteer, can implement in my code, or does the application have to find a new home?

  • 写回答

2条回答 默认 最新

  • douyou7878 2013-10-28 14:14
    关注

    The solution in this instance was to override the locations of the cache and logs directories according to the cookbook. This, however, by itself causes the cache:clear command to fail. The answer to that problem will have to appear in another question if I can't find it on my own.

    Update

    The other solution here cannot work because any php setting in .htaccess when Apache server is running FastCGI will cause a server error. Clearing the cache was never solved so the site was moved to a non-CGI host.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的