Home > Blockchain >  I got this error " ErrorException file_put_contents" after uploading Laravel files on serv
I got this error " ErrorException file_put_contents" after uploading Laravel files on serv

Time:01-15

Error

ErrorException file_put_contents(Y:\htdocs\bangla-tissue-latest-version-update\storage\framework/sessions/otfUTrVrEuEKymjPjuFimuuH08VuymYV7C5bswAM): failed to open stream: No such file or directory

Tried

I deleted the session file and tried to clear the cache though a route, but it is giving me a 404 error.

What can I do now?

CodePudding user response:

This error message is indicating that the file_put_contents function is trying to write to a file located at "Y:\htdocs\bangla-tissue-latest-version-update\storage\framework/sessions/otfUTrVrEuEKymjPjuFimuuH08VuymYV7C5bswAM", but the system is unable to find or create the file because the specified directory does not exist. It could be due to a permissions issue or the directory path is not correctly specified. You should check if the specified directory exists, and if it does not, create it or check the filepath is correct. Also, check if the user running the script has permissions to write to that directory.

  1. can clear a session file by calling the forgetmethod on the session facade. The forget method takes the key of the session data that you want to remove as its argument. for example : Session::forget('user_id');

2.Alternatively, you can remove all session data by calling the flush method on the session facade. Session::flush();

  1. use the destroy method, which will remove all session data and destroy the session entirely Session::destroy();

CodePudding user response:

Actually problem was on my server. I upload different server. It's work properly now.

  • Related