SessionHandler issue

I have a problem with my SessionHandler class. It inserts an blank session at each refresh, and when you insert something in session, the print_r function doesn't show all available options. What could generate the problem?

SessionHandler Class

Upvotes: 0

Views: 186

Answers (2)

Alexey
Alexey

Reputation: 3484

why not modify SessionHandler::sessionWrite() to log debug_backtrace() info to a temporary log file. Then you can see this "blank" session and where sessionWrite was called from and realize what to fix? So just something easy like:

    public function sessionWrite($sessionId, $sessionData)
    {
        file_put_contents('test.txt',serialize(debug_backtrace()),FILE_APPEND);
        ......
    }

Upvotes: 1

mauriblint
mauriblint

Reputation: 1707

are you using session_start() on document top ?

Upvotes: 0

Related Questions