CakePHP无法写入某些文件

时间:2012-02-21 15:09:13

标签: php cakephp cakephp-2.0

我开始使用CakePHP为我的框架开发一个网站,我刚刚开始并且已经遇到过错误,我无法解决它们的含义。

Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/lib/Cake/Cache/Cache.php on line 310
Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/lib/Cake/Cache/Cache.php on line 310
Warning: /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/app/tmp/cache/persistent/ is not writable in /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/lib/Cake/Cache/Engine/FileEngine.php on line 320
Warning: /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/app/tmp/cache/models/ is not writable in /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/lib/Cake/Cache/Engine/FileEngine.php on line 320
Warning: /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/app/tmp/cache/ is not writable in /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/lib/Cake/Cache/Engine/FileEngine.php on line 320

我也收到有关以下内容的错误:

Notice (1024): Please change the value of 'Security.salt' in app/Config/core.php to a salt value specific to your application [CORE/Cake/Utility/Debugger.php, line 717]
Notice (1024): Please change the value of 'Security.cipherSeed' in app/Config/core.php to a numeric (digits only) seed value specific to your application [CORE/Cake/Utility/Debugger.php, line 721]
Warning (512): _cake_core_ cache was unable to write 'file_map' to File cache [CORE/Cake/Cache/Cache.php, line 310]

所有人都非常感谢任何帮助。

4 个答案:

答案 0 :(得分:9)

正如Wooble指出,app / tmp文件夹需要您的网络服务器用户可写。

要纠正其他两个错误,您应该按照错误中的建议编辑app / Config / core.php文件。 Cake附带默认值,应该更改,以便不是每个Cake项目都具有相同的安全值。如果您打开该文件,您将在评论中看到说明。

如果您是Cake的新手,请查看手册网站http://book.cakephp.org上的教程......

答案 1 :(得分:4)

确保您有文件夹:app / tmp /

并具有子文件夹结构,如:

TMP /

- /高速缓存

- /日志

- /会话

- /测试

然后,检查网络用户对这些文件夹的权限。

答案 2 :(得分:2)

此目录:/Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/app/tmp/cache需要通过运行Web服务器的任何用户ID进行写入。您没有指定您所使用的操作系统,因此无法告诉您具体如何操作。

答案 3 :(得分:0)

转到您的APPLICATION_PATH / app / config / core.php文件。 并找到“Security.salt”和“Security.cipherSeed”。 之后请改变两者的价值。 然后你会得到解决方案。

相关问题