I have working CakePHP 2.5.dev
app and I have disabled cache
in CakePHP via
Configure::write('debug', 2);
Configure::write("Cache.disable", true);
in app/Config/core.php
Unfortunately I must deploy this app to a server where I can't write into app/tmp
directory.
I checked answers on StackOverflow how to disable cache and above lines into app/Config/core.php
and even commented-out rest lines which are responsible for caching ie
/**
* 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
//));
But when I run my app on production server, I get an exception.
Warning: /home/kowalski_m/public_html/projekt2/app/tmp/cache/persistent/ is not writable in /home/kowalski_m/public_html/projekt2/lib/Cake/Cache/Engine/FileEngine.php on line 384
Fatal error: Uncaught exception 'CacheException' with message 'Cache engine _cake_core_ is not properly configured.' in /home/kowalski_m/public_html/projekt2/lib/Cake/Cache/Cache.php:181 Stack trace: #0 /home/kowalski_m/public_html/projekt2/lib/Cake/Cache/Cache.php(151): Cache::_buildEngine('_cake_core_') #1 /home/kowalski_m/public_html/projekt2/app/Config/core.php(376): Cache::config('_cake_core_', Array) #2 /home/kowalski_m/public_html/projekt2/lib/Cake/Core/Configure.php(72): include('/home/kowalski_...') #3 /home/kowalski_m/public_html/projekt2/lib/Cake/bootstrap.php(175): Configure::bootstrap(true) #4 /home/kowalski_m/public_html/projekt2/app/webroot/index.php(94): include('/home/kowalski_...') #5 /home/kowalski_m/public_html/projekt2/index.php(41): require('/home/kowalski_...') #6 {main} thrown in /home/kowalski_m/public_html/projekt2/lib/Cake/Cache/Cache.php on line 181
So it looks like caching is still working.
I can't get write laws for this directory in this server. I don't have access to root.
How can I disable totally caching and setup CakePHP to don't write anything into /app/tmp
?