Bug #75308 [Opn->Nab]: Defining a session handler breaks the session

From: Date: Sun, 27 Jan 2019 09:56:21 +0000
Subject: Bug #75308 [Opn->Nab]: Defining a session handler breaks the session
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219229@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75308&edit=1

 ID:                 75308
 Updated by:         yohgaki@php.net
 Reported by:        loranger at free dot fr
 Summary:            Defining a session handler breaks the session
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Session related
 Operating System:   Debian-docker
 PHP Version:        7.1.10
 Block user comment: N
 Private report:     N

 New Comment:

Session module was accepting invalid values, including save handlers.
You must return "string" for successful read.


Previous Comments:
------------------------------------------------------------------------
[2017-10-03 15:21:24] loranger at free dot fr

Description:
------------
While trying to make my legacy code working with a brand new PHP 7.1 using debian, I discovered that
defining a session handler breaks the sessions a,nd throw the following warning: 

“Warning: session_start(): Failed to read session data: user (path: )”

I tried with an empty session_handler, using php 7.0 in order to identify the source of the problem:
It worked.

As soon as I upgrade to 7.1 (or 7.2 RC), my sessions stop working.

Test script:
---------------
https://gist.github.com/loranger/f57ce97e1a60d7d106835f07918f85f9

Actual result:
--------------
 Warning: session_start(): Failed to read session data: user (path: ) in index.php on line 49


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=75308&edit=1


Thread (2 messages)

« previous php.bugs (#219229) next »