Welcome Guest, Not a member yet? Register   Sign In
CI4 Session File Handler issue
#1

(This post was last modified: 07-24-2021, 08:33 AM by LynxCoder. Edit Reason: Readablility )

Hi all,
I have a somewhat odd problem with Sessions.  I am using the latest version of CI4, and the session handler in the .ENV is set to use the file handler.

Not every page, but sometimes, (especially if the page is refreshed) I get a Fatal Error....
Fatal error: Uncaught ErrorException: touch(): Unable to create file NULL/ci_session5oabivgbpg3ouudg0op9746292et2ql9

Now if I echo WRITEPATH I get the website root/writable - which is accurate and correct, but the file handler is putting the session files into /public/NULL/ and I am struggling to understand why. I haven't touched or replaced the session handler, nor the path to which it uses.

The writable folder contains a folder called Sessions, which have been chmod'ed to the correct values, but CI isn't using it. Can any one offer any suggestions as to what is happening, and more importantly how to correct it. I have had a search around, but haven't found anything.  If the worst comes to the worst, I'll change to the database handler.

Richie
Reply
#2

Set a valid path to save your sessions. Currently, you set it to the string 'NULL'
Reply
#3

(07-24-2021, 09:14 AM)paulbalandan Wrote: Set a valid path to save your sessions. Currently, you set it to the string 'NULL'

Thanks - what a idiot!  I'd assumed as CI created a Sessions folder within the writable folder that it was pointed there, and I left that line commented out of the .ENV!  All changed now.

Rich
Reply




Theme © iAndrew 2016 - Forum software by © MyBB