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

sevenTopo's avatar

Laravel file_put_contents(..../session/....) failed to open stream

Hi again . i started to upload my project to a hosting server.but there is always new bugs and( im the lucky one).

will my probleme is so clear first there is this message append when i try to access to subdomain

file_put_contents(C:\xampp\htdocs\njt_private_project\thermo\storage\framework/sessions/JyNXpbnsmCU6vLK2OsPVRHPaQmvMQK5YIem2QXUt): failed to open stream
```.
so as i understand laravel still use my local cache even in the server .so how can i fixe this issue mannualy  .

Note(i don't have access to the terminal in my serve so i can't clear or config or run in artisan command)
0 likes
5 replies
bobbybouwmann's avatar

It seems that you use your local path instead of the path of the server.

C:\xampp\htdocs
1 like
aurawindsurfing's avatar

Hey @seventopo

Save yourself some time and get a proper hosting that will let you understand your errors while accessing the console.

This issue is probably related to permissions and some folders not being set up properly.

Long story short. Click on one of the ads from Digital Ocean here is a my referral link that will give you 50e https://m.do.co/c/27a7fce72833

Then register also Laravel Forge to easily provision (install) your servers with MySQL, PHP, Nginx etc.

Then sib back and relax ;-)

1 like
sevenTopo's avatar

yah obviously that's the issue ,how can i change it to the path server and where i can do that ?

sevenTopo's avatar

ok after 4 hours of searching ,i found a solution . so I went to my projecdirecoryt/bootstrapp/cache.php and deleted config.php then recreated a new config.php

Please or to participate in this conversation.