生产服务器问题上的CakePHP(CentOS)

时间:2014-03-15 19:54:42

标签: php cakephp caching

所以我只是将文件移动到生产服务器(CentOS),我的DocumentRoot将是/srv/www/example.com/app/webroot。通过浏览器访问时,我收到以下错误。

PS:我已将apache设置为用户组www-data,该组是/home/user/及其子文件夹(包含 CakePHP core),该组也是/srv/www/的所有者。

[15-Mar-2014 19:47:46] PHP Warning:  SplFileInfo::openFile(/srv/www/example.com/app/tmp/cache/persistent/myapp_cake_core_file_map) [<a href='function.SplFileInfo-openFile'>function.SplFileInfo-openFile</a>]: failed to open stream: Success in /home/user/cakephp-core/cakephp-2.4.6/lib/Cake/Cache/Engine/FileEngine.php on line 355

[15-Mar-2014 19:47:46] PHP Warning:  SplFileInfo::openFile(/srv/www/example.com/app/tmp/cache/persistent/myapp_cake_core_cake_dev_en-us) [<a href='function.SplFileInfo-openFile'>function.SplFileInfo-openFile</a>]: failed to open stream: Success in /home/user/cakephp-core/cakephp-2.4.6/lib/Cake/Cache/Engine/FileEngine.php on line 355

[15-Mar-2014 19:47:46] PHP Warning:  _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /home/user/cakephp-core/cakephp-2.4.6/lib/Cake/Cache/Cache.php on line 325

[15-Mar-2014 19:47:46] PHP Fatal error:  Call to undefined function error_get_last() in /home/user/cakephp-core/cakephp-2.4.6/lib/Cake/Core/App.php on line 911

2 个答案:

答案 0 :(得分:0)

注意到我的PHP版本是5.1,这可能是问题,获得5.5。请关闭。

答案 1 :(得分:0)

检查您的网络服务器用户是否可以写入app / tmp /文件夹。