Failed to write session data Please verify the current setting of session.save_path

PHP Add comments

I was updating a project. When i checked my work i got this warning and in could not login in to the site.
Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp).

Then i searched and got the following snippet and it worked but still i have to make it bug free and i am working on it but not immediate.

ini_set('session.gc_probability', 1);

I created a directory ‘session’ in the root folder and gave the write permission.
The above script is just an example.
I ran the script and it worked.

Here we have to think about how the old session files are deleted and what is the need for the ini setting session.gc.probability… instead of me explaining this you better go to the url which i have given below.

If you face the same problem and try the above. And then you should read this article. I, yet to completely test that only then i can post anything here.

If anybody would like to give me more information about this the you can comment on this. And your objections are welcomed.

Leave a Reply

Entries RSS