Solved

Cannot run app on CakePHP [warning (512)]

Posted on 2014-07-31
7
1,680 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 500 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apple workstations and domain 5 63
Video and audio capture on Windows 7 3 124
How to include jquery as a global using webpack 1 247
Checking https returns 301 21 78
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
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 users how to migrate an existing Wordpress website to a new domain.

734 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