13

I just want to run my client's project in to my local and having this problem.

ErrorException in compiled.php line 6301: file_put_contents(C:\xampp\htdocs\tiger\storage/framework/views/111182673e168569a2371e23629d9c08): failed to open stream: No such file or directory

it is something like permission issue .. and i am windows user don't know how to figure it ... experts can u help me ? Thanks in Advance.

Wahid Nahiyan
  • 223
  • 1
  • 4
  • 11

5 Answers5

22

I had the same exact problem, try this

chmod -R guo+w storage

php artisan cache:clear
Imal Hasaranga Perera
  • 9,683
  • 3
  • 51
  • 41
18

In case anyone here is using Homestead like me, you can run into the same issue using PHPUnit.

When you run php artisan config:cache, Laravel hardcodes some paths in the cache. If you run it on your Homestead VM, it uses those paths. If you run it from your workstation, it uses those paths. You should make your cache from the Homestead VM and then execute your tests from there as well to avoid cache problems.

You can tell when the cache needs to be cleared by looking at the file path that PHPUnit tries to use. If it's not a valid path on the machine you're running the command from, you need to rebuild your cache.

Ethan Hohensee
  • 1,557
  • 1
  • 13
  • 20
  • Precisely my issue: ran `config:cache` in local machine, which broke the Homestead paths. Thank you :) – Tomas Buteler Jan 27 '17 at 14:49
  • I was having trouble, I solved it, and was ready to write a Stack Overflow answer. You beat me to it. – Jed Lynch Oct 09 '17 at 05:28
  • thank you very much i was wondering why my database.php was not updating, but after running this command everything is working fine now! – Dimitar Mar 23 '18 at 09:46
7

This solves the problem

php artisan cache:clear
  • 1
    After running this command, my page load worked without the `failed to open stream: No such file or directory` error. But I'd love to know the root cause of *why* this problem ever happens so that I can prevent it from ever happening again. – Ryan Oct 11 '17 at 17:17
  • @Ryan did you find the answer ? – VishalParkash May 13 '20 at 10:37
  • @VishalParkash No – Ryan May 13 '20 at 15:06
  • @Ryan if you are still struggling to find a solution please try this command: **composer clear-cache**, this command worked for me after trying all the solutions – VishalParkash May 14 '20 at 06:05
  • @VishalParkash Thanks. But I’d already fixed the symptom and was trying to understand the root cause. – Ryan May 14 '20 at 11:31
7
php artisan config:cache

This code clear the cache and delete cache files.

Bijaya Kumar Oli
  • 2,007
  • 19
  • 15
-5

Inside the folder C:\xampp\htdocs\tiger\storage/framework/views make a file named 111182673e168569a2371e23629d9c08

now refresh your browser this should solve your problem in window for linux users you should provide permission to for this file

Surya Neupane
  • 906
  • 10
  • 20