0

I was able to deploy my application in Linux but i am facing one issue as mentioned below.

     Warning (512):SplFileInfo::openFile(/var/www/html/tmp/cache/models/myapp_cake_model_default_email_queue): 
                   failed to open stream: Permission denied 
                   [CORE/src/Cache/Engine/FileEngine.php, line 391]

     Warning (512):SplFileInfo::openFile(/var/www/html/tmp/cache/models/myapp_cake_model_default_email_queue) 
                   [splfileinfo.openfile]: failed to open stream: Permission denied [CORE/src/Cache/Engine/FileEngine.php, line 391]

     Warning (512):cake_model cache was unable to write 'default_email_queue' to Cake\Cache\Engine\FileEngine cache 
                   [CORE/src/Cache/Cache.php, line 223].

I referred few links and tried all those but still in vain.

CakePHP 2.x warning SplFileInfo due to cakeshell

SplFileInfo::openFile(/app/tmp/cache/persistent/cake_core_cake_console_):failed to open stream:Permission denied in /lib/.../FileEngine.php line 293

Any help would be appreciated.

Community
  • 1
  • 1
Mahahari
  • 971
  • 1
  • 19
  • 36
  • What is confusing about those warning messages? – AD7six Oct 20 '15 at 08:26
  • It is terminating when i try to save some changes in my application or any changes in session. How to fix this? – Mahahari Oct 20 '15 at 08:27
  • Have you _read_ the warning messages? Have you put the text "failed to open stream: Permission denied" in google? – AD7six Oct 20 '15 at 08:38
  • yes , searched on that.. and tried all those..still sometime iam geting these warnings – Mahahari Oct 20 '15 at 08:44
  • Well there's not really any ambiguity here - _look_ (and add to the question) at the permissions of the tmp folder and files. Obviously "sometimes" you don't have permission to write to those locations. Good luck. – AD7six Oct 20 '15 at 08:48

1 Answers1

1

Try: chmod 755 -R /var/www/html/tmp

If you using ubuntu: sudo chmod 755 -R /var/www/html/tmp

Note:

Your account must have chmod privilege

Community
  • 1
  • 1
Nguyễn Anh Tuấn
  • 1,023
  • 1
  • 12
  • 19