Updating CakePHP II
Ok, after solving my first problem, I got very similar warnings:
Warning: file_put_contents(/home/dho/projects/myproject/tmp/cache/models/dbomysql_companies) [function.file-put-contents]: failed to open stream: Permission denied in /home/dho/projects/cake/cake/basics.php on line 751
That was easy to fix, I had to set the “write”-Permission for the user used by Apache (on Linux this means to use the following command: chmod -R 777 /applicationcontext/app/tmp).
Update 2008-03-02: Adding the chmod command to make the tmp folder writable, thanks to Juan!




I get this:
Warning: file_put_contents(/Users/mattnewb/Sites/cake-1.1/app/tmp/cache/models/default_test_list) [function.file-put-contents]: failed to open stream: Permission denied in /Users/mattnewb/Sites/cake-1.1/cake/basics.php on line 936
Any ideas?
@Matt: The “tmp” folder and its subfolders have to be writable by the webserver.
HTH
this helped me, thank you!
I have a similar problem, I get
/www/admin/app/tmp/cache/models/default_myModel
failed to open stream: Permission denied in /www/vendors/cake/cake/basics.php on line 936
Any help?
@Paolo: See my answer to Matt.
HTH
I am having the same problem, now how do I make the “tmp” folder and its subfolders be writable by the webserver?
ty, Juan
Never mind…the /tmp folder is inside the PHP application you’re currently working on…chmod -R 777 /applicationcontext/app/tmp, this will recursively change the permissions in the /tmp folder and it’s children..thanks HTH
@Juan: Thanks for your comment. My bad I didn’t describe it better :| I updated the article accordingly.
On Leopard:
sudo chgrp -R _www tmp/ && sudo chmod -R 775 tmp/
@Jesse: Thanks for your hint!