'概率'=> 100, 'path'=> CACHE。 'pace_codes'。 DS, 'groups'=>数组('订单') )); 我尝试过: 我试过更改tmp文件夹权限。但仍然没有用。I've got CakePHP 2.6.2 installed in windows with xampp after development i am transferring this online then server is centOS . Then show some error i.e.Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /var/www/hamdard.com/public/html/hamdard/lib/Cake/Cache/Cache.php on line 328Warning: /var/www/hamdard.com/public/html/hamdard/app/tmp/cache/persistent/ is not writable in /var/www/hamdard.com/public/html/hamdard/lib/Cake/Cache/Engine/FileEngine.php on line 385Fatal error: Uncaught exception 'CacheException' with message 'Cache engine "_cake_core_" is not properly configured. Ensure required extensions are installed, and credentials/permissions are correct' in /var/www/hamdard.com/public/html/hamdard/lib/Cake/Cache/Cache.php:186 Stack trace: #0 /var/www/hamdard.com/public/html/hamdard/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_') #1 /var/www/hamdard.com/public/html/hamdard/app/Config/core.php(374): Cache::config('_cake_core_', Array) #2 /var/www/hamdard.com/public/html/hamdard/lib/Cake/Core/Configure.php(72): include('/var/www/hamdar...') #3 /var/www/hamdard.com/public/html/hamdard/lib/Cake/bootstrap.php(431): Configure::bootstrap(true) #4 /var/www/hamdard.com/public/html/hamdard/app/webroot/index.php(98): include('/var/www/hamdar...') #5 /var/www/hamdard.com/public/html/hamdard/index.php(41): require('/var/www/hamdar...') #6 {main} thrown in /var/www/hamdard.com/public/html/hamdard/lib/Cake/Cache/Cache.php on line 186My cache configuration (in core.php) is:$engine = 'File';// In development mode, caches should expire quickly.$duration = '+999 days';if (Configure::read('debug') > 0) {$duration = '+10 seconds';}// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.$prefix = 'dox_';/** * Configure the cache used for general framework caching. Path information, * object listings, and translation cache files are stored with this configuration. */Cache::config('_cake_core_', array('engine' => $engine,'prefix' => $prefix . 'cake_core_','path' => CACHE . 'persistent' . DS,'serialize' => ($engine === 'File'),'duration' => $duration));/** * Configure the cache for model and datasource caches. This cache configuration * is used to store schema descriptions, and table listings in connections. */Cache::config('_cake_model_', array('engine' => $engine,'prefix' => $prefix . 'cake_model_','path' => CACHE . 'models' . DS,'serialize' => ($engine === 'File'),'duration' => $duration));Cache::config('quote_parameters', array('engine' => 'File','prefix' => $prefix,'serialize' => ($engine === 'File'),'duration' => '+1 week','probability' => 100,'path' => CACHE . 'quote_parameters' . DS,'groups' => array('order')));Cache::config('pace_codes', array('engine' => 'File','prefix' => $prefix,'serialize' => ($engine === 'File'),'duration' => '+1 week','probability' => 100,'path' => CACHE . 'pace_codes' . DS,'groups' => array('order')));What I have tried:I have tried change the tmp folder permission. but still its not working.推荐答案 engine ='File'; //在开发模式下,缓存应该很快到期。 engine = 'File';// In development mode, caches should expire quickly. duration ='+999 days'; if(Configure :: read('debug')> 0){ duration = '+999 days';if (Configure::read('debug') > 0) { duration ='+ 10秒'; } //使用不同的字符串在同一服务器上添加每个应用程序,以避免Memcache和APC冲突。 duration = '+10 seconds';}// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts. 这篇关于将cakephp从localhost传输到在线时出错(在线服务器是centos)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-29 06:10