Hamender
Hamender

Reputation: 85

CakePhp with xampp

I am trying to execute my first application in cakephp, but it's giving an error

Fatal error: Uncaught exception 'CacheException' with message 'Cache
engine _cake_core_ is not properly configured.' in
/opt/lampp/htdocs/CakeTooDoo/lib/Cake/Cache/Cache.php:166 Stack trace:
#0 /opt/lampp/htdocs/CakeTooDoo/lib/Cake/Cache/Cache.php(136): Cache::_buildEngine('_cake_core_') #1
/opt/lampp/htdocs/CakeTooDoo/app/Config/core.php(336):
Cache::config('_cake_core_', Array) #2
/opt/lampp/htdocs/CakeTooDoo/lib/Cake/Core/Configure.php(78):
include('/opt/lampp/htdo...') #3
/opt/lampp/htdocs/CakeTooDoo/lib/Cake/bootstrap.php(171):
Configure::bootstrap(true) #4
/opt/lampp/htdocs/CakeTooDoo/app/webroot/index.php(92):
include('/opt/lampp/htdo...') #5 {main} thrown in
/opt/lampp/htdocs/CakeTooDoo/lib/Cake/Cache/Cache.php on line 166

and two warnings

Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to
File cache in /opt/lampp/htdocs/CakeTooDoo/lib/Cake/Cache/Cache.php on
line 310

Warning: /opt/lampp/htdocs/CakeTooDoo/app/tmp/cache/persistent/ is not
writable in
/opt/lampp/htdocs/CakeTooDoo/lib/Cake/Cache/Engine/FileEngine.php on
line 337

Pleas give me any solution to do my first application with cakephp.

Upvotes: 1

Views: 3689

Answers (2)

liyakat
liyakat

Reputation: 11853

you can use a permissive ownership:

chmod -R 777 app/tmp

A better method is to change group ownership of tmp and everthing below it to www-data ( or whatever group your apache server runs in ) with 'chgrp -R www-data tmp' followed by 'chmod -R 774 tmp' This makes tmp read/write for you and the www-data group but readonly for everyone else

let me know if i can help you more.

Upvotes: 2

蒋艾伦
蒋艾伦

Reputation: 464

The cache folder is not writable according to warning.

open terminal, run sudo chmod 777 /opt/lampp/htdocs/CakeTooDoo -R

Plus, you should reconfigure file permissions, like 775, in real productions.

Upvotes: 1

Related Questions