12

I have the following issue when trying to install Laravel http://laravel.com

Any help, would be greatly appreciated.

Unhandled Exception

Message:

file_put_contents(/Users/alvincrespo/Sites/apollo/storage/views/26bdebca7505781c753aa21663170a1b) [function.file-put-contents]: failed to open stream: Permission denied Location:

/Users/alvincrespo/Sites/apollo/laravel/blade.php on line 63 Stack Trace:

#0 /Users/alvincrespo/Sites/apollo/laravel/laravel.php(40): Laravel\Error::native(2, 'file_put_conten...', '/Users/alvincre...', 63) #1 [internal function]: Laravel{closure}(2, 'file_put_conten...', '/Users/alvincre...', 63, Array) #2 /Users/alvincrespo/Sites/apollo/laravel/blade.php(63): file_put_contents('/Users/alvincre...', '...') #3 [internal function]: Laravel{closure}(Object(Laravel\View)) #4 /Users/alvincrespo/Sites/apollo/laravel/event.php(199): call_user_func_array(Object(Closure), Array) #5 /Users/alvincrespo/Sites/apollo/laravel/event.php(138): Laravel\Event::fire('laravel.view.en...', Array, true) #6 /Users/alvincrespo/Sites/apollo/laravel/view.php(325): Laravel\Event::until('laravel.view.en...', Array) #7 /Users/alvincrespo/Sites/apollo/laravel/view.php(546): Laravel\View->render() #8 /Users/alvincrespo/Sites/apollo/laravel/response.php(246): Laravel\View->__toString() #9 /Users/alvincrespo/Sites/apollo/laravel/laravel.php(138): Laravel\Response->render() #10 /Users/alvincrespo/Sites/apollo/public/index.php(34): require('/Users/alvincre...') #11 {main}

4
  • Not sure if it was the permissions on my comp but I basically did a chmod -R 777 apollo/ and it worked. I know this is probably not the best solution. Commented May 31, 2012 at 19:37
  • 1
    Can you try changing to 775 and see if it still works? Commented May 31, 2012 at 19:40
  • Second the above, 777 is v dangerous. Commented Jul 27, 2012 at 7:47
  • Had same issue, 775 works Commented Mar 5, 2013 at 21:14

4 Answers 4

14

I would check that the permissions on:

/Users/alvincrespo/Sites/apollo/storage/views/26bdebca7505781c753aa21663170a1b

Allow your application to write to this directory.

Assuming you are on a linux box you could run ls -l to see what the permissions are, and if it is set to read only, change the permissions with chmod.

Sign up to request clarification or add additional context in comments.

Comments

2

As you can see in the very good documentation under install, you have to make the directory storage/views writeable.

http://laravel.com/docs/install#installation

Comments

2

Although it’s an old question but I hope this might help someone, here is what solved the problem for me.

sudo chmod -R 754 storage/

Comments

0

check the permissions of /storage directory in the laravel installation. The views directory must have write permisison for the webserver that is it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.