Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CakePHP unable to write to certain files

I am starting to develop a website using CakePHP for my framework, I've literally just started and have already encountered errors, I can't work about what they mean.

Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/lib/Cake/Cache/Cache.php on line 310
Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/lib/Cake/Cache/Cache.php on line 310
Warning: /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/app/tmp/cache/persistent/ is not writable in /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/lib/Cake/Cache/Engine/FileEngine.php on line 320
Warning: /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/app/tmp/cache/models/ is not writable in /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/lib/Cake/Cache/Engine/FileEngine.php on line 320
Warning: /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/app/tmp/cache/ is not writable in /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/lib/Cake/Cache/Engine/FileEngine.php on line 320

I am also getting an error about the following:

Notice (1024): Please change the value of 'Security.salt' in app/Config/core.php to a salt value specific to your application [CORE/Cake/Utility/Debugger.php, line 717]
Notice (1024): Please change the value of 'Security.cipherSeed' in app/Config/core.php to a numeric (digits only) seed value specific to your application [CORE/Cake/Utility/Debugger.php, line 721]
Warning (512): _cake_core_ cache was unable to write 'file_map' to File cache [CORE/Cake/Cache/Cache.php, line 310]

Any help would be much appreciated by all.

like image 281
GSG Avatar asked Feb 21 '12 15:02

GSG


3 Answers

As Wooble points out the app/tmp folder needs to be writeable by your webserver user.

To correct the other two errors you should edit the app/Config/core.php file as suggested in the errors. Cake ships with default values which should be changed so that not every Cake project has the same security values. If you open that file you will see instructions in the comments.

If you're new to Cake then have a look at the tutorial on the manual site http://book.cakephp.org ...

like image 94
Andy Avatar answered Nov 19 '22 15:11

Andy


Ensure you has folder: app/tmp/

and have the sub folder structure like:

tmp/

--/cache

--/logs

--/sessions

--/tests

Then, check the web users' permission on these folder.

like image 32
KingBowen Avatar answered Nov 19 '22 17:11

KingBowen


This directory: /Applications/XAMPP/xamppfiles/htdocs/evolvidsnew/app/tmp/cache needs to be made writeable by whatever user ID your webserver is running under. You don't specify which OS you're on, so can't tell you how to do that specifically.

like image 2
Marc B Avatar answered Nov 19 '22 15:11

Marc B