网站正在PHP下运行。使用Smarty 3.1.x无法写入文件
网站工作正常,大约半年没有任何变化!约2-3个星期前就开始接受错误日志:
2014-02-21 0:22:19 - CRIT --> unable to write file D:\home\site\wwwroot\/include/smarty/templates_c\bc3a2c744a52ffed3fac136ce7e5bacb0648e1ba.file.ik_home.tpl.php. Line: 74. File: D:\home\site\wwwroot\include\smarty\libs\sysplugins\smarty_internal_write_file.php
而是文件名,应创建,蔚蓝的主机创建了奇怪的名字的文件,即
wrt530644e3a6c503.24424555
的代替
bc3a2c744a52ffed3fac136ce7e5bacb0648e1ba.file.ik_home.tpl.php
我可以wrt530644e3a6c503.24424555到期望bc3a2c744a52ffed3fac136ce7e5bacb0648e1ba.file.ik_home.tpl.php使用FTP客户端
的var_dump重命名(is_writable( '〜/包含/ smarty的/ templates_c')); // bool(true)
我在SO Smarty - 'unable to write file... templates_c'. (smarty_internal_write_file.php:44)中发现了一个类似的问题,但它没有答案并且已关闭。作者刚刚说他的托管公司固定的权限。
还有一个SO问题WindowsAzure: Is it possible to set directory permissions within the web.config?答案解释了如果发生硬盘故障,将我的文件移动到另一个机架和重建实例时会发生什么。在这种情况下,我应该如何处理权限?我真的不知道实际上是否有任何失败:)