2016-06-01 17:19
浏览 50

在azure web app上托管symfony2应用程序

i have a problem hosting a symfony2 app on azure. It am always getting an "Failed to write cache file" error in Filesystem.php. I guess that php does not not have the permission to write to the cache folder. How can i give php the permisson to modify the cache, without webdeploy or git, i only have ftp and the azure management portal.

KR Manuel

图片转代码服务由CSDN问答提供 功能建议

我在azure上托管symfony2应用程序时遇到问题。 它始终在Filesystem.php中收到“无法写入缓存文件”错误。 我猜php没有写入缓存文件夹的权限。 如何在没有webdeploy或git的情况下给php提供缓存的权限,我只有ftp和天蓝色的管理门户。

KR Manuel

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongzen5577 2016-06-02 12:10

    You have to set the correct directories for logs and cache in your Kernel. And you can usually set permissions for that folder using your FTP client.

    public function getCacheDir()
        if ($this->getEnvironment() == 'prod') {
            return 'D:\\home\\data\\cache\\prod';
        return parent::getCacheDir();
    public function getLogDir()
        if ($this->getEnvironment() == 'prod') {
            return 'D:\\home\\LogFiles\\app\\';
        return parent::getLogDir();

    there is also a pre-made bundle to take care of these things:

    and even a detailed tutorial:

    解决 无用
    打赏 举报

相关推荐 更多相似问题