0

I have installed fresh Xampp, And set the virtual host, When i accessed the site, The following error came up.

file_put_contents(/b237142d7ac388af2fe193a8361f611a83409dff.php): failed to open stream: Permission denied.

I searched for the issue, Folk says that its /storage permission issue i have changed the permission to sudo chmod -R 777 /site-name/storage.

But the issue still remains.

Am i missing something ?

Gammer
  • 5,453
  • 20
  • 78
  • 121
  • file_put_contents('/site-name/storage/b237142d7ac388af2fe193a8361f611a83409dff.php') ? – Antony Gibbs May 24 '16 at 13:28
  • the content perhaps? – Jack May 24 '16 at 13:30
  • 1
    `/b237142d7ac388af2fe193a8361f611a83409dff.php` is in filesystem root; and your pplication should not have permissions too write there. If you prefix a filename with `/`, that makes it absolute, not relative – Mark Baker May 24 '16 at 13:31
  • You need to give writing permission to web-server user to all directories in the path, not just the last one – Jack May 24 '16 at 13:31

2 Answers2

0

In the storage folder,app, framework folders were missing, By adding them the issue is gone and now things are working like a charm.

Gammer
  • 5,453
  • 20
  • 78
  • 121
0

I had the same problem with a Laravel 5.2 project. I already had the folders app and framework in storage folder. Then I found that in framework folder you need to have three folders: cache, views and sessions-- and make sure storage folder has the write permission.

This answer helped to solve the problem finally.

Community
  • 1
  • 1
Abdul Jamil
  • 363
  • 3
  • 13
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. – Mathlight Jun 30 '16 at 06:45