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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 17:01:33 2025 UTC