PHP7, Catchable fatal error: session_regenerate_id(): Failed to create(read) session ID #392

Closed
opened 2026-10-04 23:56:14 +02:00 by adam · 7 comments
Owner

http://piwigo.org/forum/viewtopic.php?id=26239

This is a PHP 7 bug, that should be fixed in version 7.0.3 (release date = 2016-02-07), see https://github.com/php/php-src/blob/PHP-7.0/NEWS#L70

http://piwigo.org/forum/viewtopic.php?id=26239 This is a PHP 7 bug, that should be fixed in version 7.0.3 (release date = 2016-02-07), see https://github.com/php/php-src/blob/PHP-7.0/NEWS#L70 <!-- github-sync-id:129146201 -->
adam closed this issue 2026-10-04 23:56:14 +02:00
Author
Owner

With PHP 7.0.3, the problem still occurs... (PHP 7.0.3-1~dotdeb+8.1 on Debian Jessie)

With PHP 7.0.3, the problem still occurs... (PHP 7.0.3-1~dotdeb+8.1 on Debian Jessie) <!-- github-comment-id:182312561 -->
Author
Owner

@fcoiffie thank you for this report

@nikrou also reported a problem with PHP 7.0.2 and proposed a fixed. Can you create a PR?

@fcoiffie thank you for this report @nikrou also reported a problem with PHP 7.0.2 and proposed a fixed. Can you create a PR? <!-- github-comment-id:182315562 -->
Author
Owner

Of course I can but I cannot already test with PHP 7.0.3

Of course I can but I cannot already test with PHP 7.0.3 <!-- github-comment-id:182318783 -->
Author
Owner

Unfortunately, even with fix from @nikrou, I still have error on PHP 7.0.3

Catchable fatal error: session_regenerate_id(): Failed to create(read) session ID: user (path: /var/lib/php/sessions) in .../include/functions_user.inc.php on line 953

I'm going to remove the 7.0.3 test.

Unfortunately, even with fix from @nikrou, I still have error on PHP 7.0.3 Catchable fatal error: session_regenerate_id(): Failed to create(read) session ID: user (path: /var/lib/php/sessions) in .../include/functions_user.inc.php on line 953 I'm going to remove the 7.0.3 test. <!-- github-comment-id:182368553 -->
Author
Owner
@fcoiffie can you make a new try with https://github.com/Piwigo/Piwigo/commit/e71b61aee1b3e077899bb8276398f4c705586e51 ? <!-- github-comment-id:182370736 -->
Author
Owner

I manually applied this patch on my Piwigo version and it works : no error. (But I can't say if it's safe...)

I manually applied this patch on my Piwigo version and it works : no error. (But I can't say if it's safe...) <!-- github-comment-id:182381888 -->
Author
Owner

When session_regenerate_id() will be fixed on PHP 7, we will use it again.

When session_regenerate_id() will be fixed on PHP 7, we will use it again. <!-- github-comment-id:182384790 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#392