php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71580 session_regenerate_id(): Failed to create(read) session
Submitted: 2016-02-12 23:42 UTC Modified: 2016-02-18 21:52 UTC
From: ericsten@php.net Assigned: ericsten (profile)
Status: Closed Package: WinCache (PECL)
PHP Version: 7.0.3 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ericsten@php.net
New email:
PHP Version: OS:

 

 [2016-02-12 23:42 UTC] ericsten@php.net
Description:
------------
A change was made to the PHP7 session handler such that PS_READ_FUNC implementations must return SUCCESS + ZSTR_EMPTY_ALLOC() for non-existent session IDs.
See related bug https://bugs.php.net/bug.php?id=71187 

Test script:
---------------
<?php
session_start();

$old_sessionid = session_id();

session_regenerate_id();

$new_sessionid = session_id();

echo "Old Session: $old_sessionid<br />";
echo "New Session: $new_sessionid<br />";

print_r($_SESSION);
?> 

Expected result:
----------------
session_regenerate_id shouldn't fail for empty/non-existent session IDs.

Actual result:
--------------
[31-Jan-2016 16:45:51 Europe/London] PHP Catchable fatal error:  session_regenerate_id(): Failed to create(read) session ID: wincache (path: C:\Windows\Temp) in [file location]

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-02-12 23:42 UTC] ericsten@php.net
-Assigned To: +Assigned To: ericsten
 [2016-02-18 21:50 UTC] ericsten@php.net
Automatic comment from SVN on behalf of ericsten
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=338616
Log: 2.0.0.6:
- Fix bug 71580 session_regenerate_id(): Failed to create(read) session
- Code cleanup in file change notification
- Ignore change notifications for new files, since they won't exist in the file cache
 [2016-02-18 21:52 UTC] ericsten@php.net
-Status: Assigned +Status: Closed
 [2016-02-18 21:52 UTC] ericsten@php.net
Fixed in WinCache 2.0.0.6
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC