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 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题