Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cannot run app on CakePHP [warning (512)]

Posted on 2014-07-31
7
Medium Priority
?
1,812 Views
Last Modified: 2014-09-01
Hello,
I am getting an error while trying to run app:

Warning: SplFileInfo::openFile(/Users/username/Sites/cake/app/tmp/cache/persistent/myapp_cake_core_file_map): failed to open stream: Permission denied in /Users/username/Sites/cake/lib/Cake/Cache/Engine/FileEngine.php on line 355
Warning (512): SplFileInfo::openFile(/Users/username/Sites/cake/app/tmp/cache/models/myapp_cake_model_default_agr_rewp_list): failed to open stream: Permission denied [CORE/Cake/Cache/Engine/FileEngine.php, line 355]
Warning (512): SplFileInfo::openFile(/Users/username/Sites/cake/app/tmp/cache/models/myapp_cake_model_default_agr_rewp_list) [splfileinfo.openfile]: failed to open stream: Permission denied [CORE/Cake/Cache/Engine/FileEngine.php, line 355]
Warning (512): SplFileInfo::openFile(/Users/username/Sites/cake/app/tmp/cache/persistent/myapp_cake_core_cake_dev_eng) [splfileinfo.openfile]: failed to open stream: Permission denied [CORE/Cake/Cache/Engine/FileEngine.php, line 355]
Warning (512): SplFileInfo::openFile(/Users/username/Sites/cake/app/tmp/cache/persistent/myapp_cake_core_cake_dev_eng) [splfileinfo.openfile]: failed to open stream: Permission denied [CORE/Cake/Cache/Engine/FileEngine.php, line 355]
Warning (512): _cake_core_ cache was unable to write 'cake_dev_eng' to File cache [CORE/Cake/Cache/Cache.php, line 323]
Warning (512): _cake_model_ cache was unable to write 'default_agr_rewp_list' to File cache [CORE/Cake/Cache/Cache.php, line 323]
---------

Any ideas how to fix it?

Best regards,
F.
0
Comment
Question by:ikealt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 43

Expert Comment

by:Rob
ID: 40234056
yes, you need to make your Cache directory writable.  The manual even has the commands you can run to fix it assuming you're on linux:

http://book.cakephp.org/2.0/en/installation.html#permissions

HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1`
setfacl -R -m u:${HTTPDUSER}:rwx app/tmp
setfacl -R -d -m u:${HTTPDUSER}:rwx app/tmp

Open in new window

0
 

Author Comment

by:ikealt
ID: 40234059
Hi, Thanks for it. I am using Mac x OS.
Is it the same in terminal or different?
0
 
LVL 43

Accepted Solution

by:
Rob earned 2000 total points
ID: 40234209
Should be the same. But if you need to then just use:

chmod -R 777 app/tmp

In the patent directory. Not ideal to have those permissions but I'm guessing you're just running this locally at the moment given you're running it in your Mac?
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 

Author Comment

by:ikealt
ID: 40234213
Yes, you are right. I am running it locally and on my own Mac.
0
 
LVL 43

Expert Comment

by:Rob
ID: 40234219
You may need to use sudo before that chmod command
0
 

Author Comment

by:ikealt
ID: 40297005
Thanks its working!
0
 

Author Closing Comment

by:ikealt
ID: 40297006
Thanks.
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question