I have a project on Laravel 5 and I work with it at the office and at home too. It works fine, but recently at home it stopped working. Laravel show me two ErrorException
file_put_contents(G:\project\storage\framework\views/751d8a0fd8a7d4138c09ceb6a34bb377aa2d6265.php):
failed to open stream: No such file or directory
and
file_put_contents(G:\project\storage\framework/sessions/aIXycR4LIAUBVIqZu0T590paOMIpV8vfZGIroEp0):
failed to open stream: No such file or directory
I'm searching problem decision with Google and find information about correct rights. All advice is about Linux, but I'am work in Windows at the office and at home too.
When I try to clear application cache and view cache, artisan talk to me - ...cleared. But cache data and views are present in storage.
How can I fix this problem?
Thanks in advance!
In case of shared hosting when you do not have command line access simply navigate to laravel/bootstrap/cache folder and delete (or rename) config.php and you are all done!
The best way to solve this problem is, go to directory "laravel/bootstrap/cache" and delete config.php file. or you can rename it as well like config.php.old And your problem will be fix. Happy coding :-)
The reason for this problem is the cache files in localhost. According to that I've tried several things as follows to clear the cache on my project, but every time I've failed.
So I've found a solution for this problem after each and every above steps failed and it worked for me perfectly. I deleted the cache.php file in host_route/bootstrap/cache directory.
I think this answer will help your problem.
The best way to solve this problem is, go to directory
laravel/bootstrap/cache
and delete all files from cache.To do this, run the following Artisan commands on your command line
1. php artisan config:clear
2. php artisan cache:clear
3. php artisan config:cache
In your panel or server, you can execute commands by adding the following to your routes:
And then call the
www.yourdomain.com/clear-cache
route from your browser.After some research I understand - I have very similar, but different root project locations and its cached in
/bootstrap/cache
. After cache clearing project started.Apache + WSL on windows
This is a silly mistake, and a different answer compared to the others, but I'll add it because it happened to me.
If you use WSL (linux bash on windows) to manage your laravel application, while using your windows apache to run your server, then running any caching commands in the wsl will store the linux path rather than the windows path to the sessions and other folders.
Solution
Simply run the cache clearing commands in the powershell, rather than in WSL.
Was enough for me.