Solved

Cannot run app on CakePHP [warning (512)]

Posted on 2014-07-31
7
1,714 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
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 reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

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