Skip to content

Bug: [Session] Redis - write_close_session #7695

Description

@gabriel-dina

PHP Version

8.2

CodeIgniter4 Version

4

CodeIgniter4 Installation Method

Manual (zip or tar.gz)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

apache

Database

No response

What happened?

switching session filehandler to redis handler works as exepected as long as I'm not using session_write_close.

calling session_write_close in the same script works fine but in ajax calls I get an empty session.

after session_write_close, session->destroy() generate an exception as well

Steps to Reproduce

  1. switch to redis file handler
    set in
    public $sessionDriver = 'CodeIgniter\Session\Handlers\RedisHandler';
    public string $sessionSavePath = 'tcp://localhost:6379?database=10'

set session variable in main script
call session_write_close()
3. make an ajax call and check session variables.

Expected Output

to work like file handler

Anything else?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions