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

davy_yg's avatar
Level 27

Storage Session error

After moving one web file and it's database to a new laptop, I get this error message:

file_put_contents(D:\xampp72\htdocs\aws_admin\storage\framework/sessions/fBEsflR577tG4HbxEzgo2VrDSOz48PSrsjovpAFT): failed to open stream: No such file or directory 

Which I do not understand what?

ref: https://laravel.com/docs/5.7/session

Why is it error? And what is storage/sessions for?

0 likes
6 replies
Sinnbeck's avatar

Ensure that D:\xampp72\htdocs\aws_admin\storage\framework/sessions/ exists and that your website have write permissions to the folder

davy_yg's avatar
Level 27

I wonder why it even ask for that file. In my other computer the same file and db works just fine. After I copy it to my second my computer that error appears.

Why it even ask for that file?

Nakov's avatar

@davy_yg you should not even copy those files at all. Those are cached files, and it works on the other computer because the User of that computer is the owner of those files, and not the user on the new computer..

Take a look at using Git as a version control system, create a project on GitHub or BitBucket, and share the code that way between machines/server.

Snapey's avatar

You have Laravel configured to store user sessions on disk. Many randomly named files will be created for sessions and cached views. Therefore your web server must be allowed to write to the storage folder.

davy_yg's avatar
Level 27

So those random session cache files to storage session right?

Please or to participate in this conversation.