gpt4 book ai didi

apache - fatal error : Uncaught exception 'Zend_Cache_Exception' with message > 'cache_dir must be a directory'

转载 作者:行者123 更新时间:2023-12-04 13:42:57 27 4
gpt4 key购买 nike

完成我的代码更新后。我得到了这个错误。
您能帮我解决这个问题吗?
我将777权限授予所有文件夹。
提前致谢!

Fatal error: Uncaught exception 'Zend_Cache_Exception' with message 'cache_dir must be a directory' in C:\xampp\htdocs\mts\library\Zend\Cache.php:208 Stack trace: #0 C:\xampp\htdocs\mts\library\Zend\Cache\Backend\File.php(154): Zend_Cache::throwException('cache_dir must ...') #1 C:\xampp\htdocs\mts\library\Zend\Cache\Backend\File.php(121): Zend_Cache_Backend_File->setCacheDir('C:\xampp\htdocs...') #2 C:\xampp\htdocs\mts\library\Zend\Cache.php(152): Zend_Cache_Backend_File->__construct(Array) #3 C:\xampp\htdocs\mts\library\Zend\Cache.php(93): Zend_Cache::_makeBackend('File', Array, false, false) #4 C:\xampp\htdocs\mts\application\Bootstrap.php(22): Zend_Cache::factory('Core', 'File', Array, Array) #5 C:\xampp\htdocs\mts\library\Zend\Application\Bootstrap\BootstrapAbstract.php(636): Bootstrap->_initCache() #6 C:\xampp\htdocs\mts\library\Zend\Application\Bootstrap\BootstrapAbstract.php(589): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('cache') 7# C:\xampp\htdocs\mts\library\Zend\Application\Bootstrap\Boots in C:\xampp\htdocs\mts\library\Zend\Cache.php on line 208

最佳答案

在 bootstrap 中设置缓存

  protected function _initCaching() {
$frontend = array(
'lifetime' => 7200,
'automatic_serialization' => true
);
$backend = array(
'cache_dir' => sys_get_temp_dir(), /**automatically detects**/
);
$cache = Zend_Cache::factory('core', 'File', $frontend, $backend);
Zend_Registry::set('cache', $cache);
}

关于apache - fatal error : Uncaught exception 'Zend_Cache_Exception' with message > 'cache_dir must be a directory' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8979182/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com