{"id":200,"date":"2010-06-21T16:13:24","date_gmt":"2010-06-21T10:43:24","guid":{"rendered":"http:\/\/vikku.info\/codesnippets\/?p=200"},"modified":"2013-10-02T12:08:50","modified_gmt":"2013-10-02T06:38:50","slug":"failed-to-write-session-data-please-verify-that-the-current-setting-of-sessionsave_path","status":"publish","type":"post","link":"http:\/\/vikku.info\/codesnippets\/php\/failed-to-write-session-data-please-verify-that-the-current-setting-of-sessionsave_path\/","title":{"rendered":"Failed to write session data Please verify the current setting of session.save_path"},"content":{"rendered":"<p>I was updating a project. When i checked my work i got this warning and in could not login in to the site.<br \/>\nFailed to write session data (files). Please verify that the current setting of session.save_path is correct (\/tmp).<\/p>\n<p>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. <\/p>\n<pre lang='php'>\r\nsession_save_path('\/home\/site\/public_html\/session');\r\nini_set('session.gc_probability', 1);\r\n<\/pre>\n<p>I created a directory &#8216;session&#8217; in the root folder and gave the write permission.<br \/>\nThe above script is just an example.<br \/>\nI ran the script and it worked.<\/p>\n<p>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&#8230; instead of me explaining this you better go to the url which i have given below.<\/p>\n<p>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.<\/p>\n<p>If anybody would like to give me more information about this the you can comment on this. And your objections are welcomed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"http:\/\/vikku.info\/codesnippets\/wp-json\/wp\/v2\/posts\/200"}],"collection":[{"href":"http:\/\/vikku.info\/codesnippets\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/vikku.info\/codesnippets\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/vikku.info\/codesnippets\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/vikku.info\/codesnippets\/wp-json\/wp\/v2\/comments?post=200"}],"version-history":[{"count":5,"href":"http:\/\/vikku.info\/codesnippets\/wp-json\/wp\/v2\/posts\/200\/revisions"}],"predecessor-version":[{"id":323,"href":"http:\/\/vikku.info\/codesnippets\/wp-json\/wp\/v2\/posts\/200\/revisions\/323"}],"wp:attachment":[{"href":"http:\/\/vikku.info\/codesnippets\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/vikku.info\/codesnippets\/wp-json\/wp\/v2\/categories?post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/vikku.info\/codesnippets\/wp-json\/wp\/v2\/tags?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}