Welcome Guest, Not a member yet? Register   Sign In
CI4 Session Path
#1

Hello,

Version:  4.1.1
Hosted on : NginX

I am fairly new to CI4. And I have a problem with my sessions not being saved.

Here are my .env settings for session

Code:
app.sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler'
app.sessionCookieName = 'ci_session'
app.sessionSavePath = '/var/www/html/caf/writable/session/'
# app.sessionSavePath = '/priv/sessions/'
app.sessionMatchIP = true
app.sessionTimeToUpdate = 300
app.sessionRegenerateDestroy = true

And

drwx------ 7 www-data www-data 4096 Feb 2 02:41 writable

when I check the writable directory no sessions are saved.

Please help
Reply
#2

Did you initialize session?
https://codeigniter4.github.io/CodeIgnit...-a-session
Reply
#3

(03-15-2021, 09:45 PM)kenjis Wrote: Did you initialize session?
https://codeigniter4.github.io/CodeIgnit...-a-session

Yes I did, thank you for the reply..

After a very tiresome night, I fould the one at fault

Code:
app.cookieSecure = true
app.cookieHTTPOnly = true
app.cookieSameSite = 'Lax'


The cookie was not being set. I set app.cookieSecure to false.

Adapting to CI4 from CI3 is hard
Reply




Theme © iAndrew 2016 - Forum software by © MyBB