Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 328

Warning: /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 385

Fatal 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 186

My 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.
Posted
Comments
Mohibur Rashid 6-May-16 5:15am    
you will have to fix not just temp, any directory under temp.
/var/www/hamdard.com/public/html/hamdard/app/tmp/cache/persistent/
Krishna BSPL 6-May-16 6:10am    
Yes i have given 777 permission to all directory into the tmp folder.
Krishna BSPL 6-May-16 6:32am    
Now its working but webroot folder is not working. please any help..
Mohibur Rashid 6-May-16 7:34am    
What does the error say?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900