Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Gfinity's avatar

file put content error: php cache issues

I am trying to upload my laravel project from Xampp to shared hosting, but I get the error: file_put_contents(C:\xampp\htdocs\resido\storage\framework/sessions/Jmmr9HI35UYdhIfZLDTVlLGjCy5AHiuVK9NfOQuT): failed to open stream: No such file or directory

when I try either of the following solutions:

  1. delete the file app/bootstrap/cache/config.php
  2. composer dump-autoload
  3. php artisan config:clea the application works. however, all the changes I made while working with xampp is gone and I get the old view from the application template.

how do I fix this problem without losing the changes I made to the project?

kindly help please

0 likes
23 replies
automica's avatar

@gfinity to clear application cache you need to run the following:

php artisan cache:clear
Sinnbeck's avatar

Just to understand this properly. Your production server, which I assume is running linux, is trying to use a windows path?

Gfinity's avatar

@Sinnbeck yes I worked on the project using xampp. now I'm trying to upload it to live hosting and I get the error

when I try the above options, all my changes and updates to the app template is gone and I get old view

Sinnbeck's avatar

@Gfinity If a linux server is showing some windows path, it means you have that referenced somewhere

Try opening /bootstrap/cache on the server, and delete everything but .gitignore

Gfinity's avatar

@Sinnbeck this is the problem when I do Delete those files, I lose all all the changes I have made to the app, including content uploads how do I fix this without losing my changes?

Sinnbeck's avatar

@Gfinity Ok just making sure here. You chose to manually edit the cache files locally when developing your app, instead of changing the actual code of laravel ? Just want to make sure we dont misunderstand each other.

Can you show an example of a file you changed?

Gfinity's avatar

@Sinnbeck there's no way to send screengrabs on here? I wanted to send screen grabs of the changes and the old view

Gfinity's avatar

@Sinnbeck no no i'm not talking about the codes

I don't write any codes I made the changes from the dashboard

Gfinity's avatar

@Sinnbeck yes It is saved in the dashboard, but when I upload, I get old view of the app all the changes I made in the dashboard is gone

Sinnbeck's avatar

@Gfinity Sorry I am not following. How does this dashboard save the data? Saying "it is saved in the dashboard" does not tell me anything

Gfinity's avatar

@Sinnbeck can I send an email please? so that I can show you screengrabs of what I mean

the project I am working on is "Resido" real estate website built on Laravel the template is just like wordpress, I can login to the dashboard and upload all my files and make all changes from the admin dashboard

if only I could send screenshots so you'll understand better I'm not working with the source code of the project there is a dashboard in the project from which I make all my changes

Sinnbeck's avatar

@Gfinity So you added everything locally and try to upload it to the server?

You can put the image on imgur.com and post a link to it

elias102's avatar

Have you run this command?

php artisan view:clear
Gfinity's avatar

@elias102 yes I have it resets my project and I lose all the changes I have made I do not want that

elias102's avatar

No, this command just clear all cache of view

after run this command you can run following command for cache new views:

php artisan view:cache
Gfinity's avatar

@elias102 just ran the command php artisan view:cache I got the error: "The "C:\xampp\htdocs\resido\resources\views" directory does not exist."

Please or to participate in this conversation.