|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-08-24 13:49 UTC] angelo dot courtel at laposte dot net
[2020-08-25 14:35 UTC] angelo dot courtel at laposte dot net
[2020-08-25 14:35 UTC] angelo dot courtel at laposte dot net
-Status: Open
+Status: Closed
[2020-08-25 14:35 UTC] angelo dot courtel at laposte dot net
[2020-08-25 16:45 UTC] cmb@php.net
-Status: Closed
+Status: Not a bug
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 04:00:01 2025 UTC |
Description: ------------ Hello, We note a broken behavior of session_start() function, configured with below config : session Session Support enabled Registered save handlers files user memcached Registered serializer handlers php_serialize php php_binary Directive Local Value Master Value session.save_handler memcached files session.save_path memcached.local:11211 no value session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly 1 1 session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_samesite no value no value session.cookie_secure 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 14400 14400 session.gc_probability 1 1 session.lazy_write Off Off session.name PHPSESSID PHPSESSID session.referer_check no value no value session.serialize_handler php php session.sid_bits_per_character 4 4 session.sid_length 32 32 session.upload_progress.cleanup On On session.upload_progress.enabled On On session.upload_progress.freq 1% 1% session.upload_progress.min_freq 1 1 session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS session.upload_progress.prefix upload_progress_ upload_progress_ session.use_cookies 1 1 session.use_only_cookies 1 1 session.use_strict_mode 1 1 session.use_trans_sid 0 0 Some time session start works fine, but in ~50% of case a new session id is spawned. There are no warning displayed about session_start failed. Test script: --------------- <?php error_reporting(E_ALL); session_start(); ?><pre><?php var_dump('sessid in $_COOKIE :', $_COOKIE["PHPSESSID"]); var_dump('session_id() : ', session_id()); var_dump($_SESSION); $_SESSION['marker'] = date('Y-m-d H:i:s'); var_dump($_SESSION); session_write_close(); //our memcached.local service run with this config : //docker run --name my-memcache -d memcached memcached -m 64 -p 11211:11211 //we reproduce this bug in both 1.5.20 and 1.6.6 version (latest) //pecl memcached library is memcached-3.1.5 //this test script works fine in php 7.4.9 with same pecl and memcached server versions Expected result: ---------------- string(20) "sessid in $_COOKIE :" string(32) "a6f0a72f144fa887ad90d2bd75781030" string(15) "session_id() : " string(32) "a6f0a72f144fa887ad90d2bd75781030" array(1) { ["marker"]=> string(19) "2020-08-24 14:47:21" } array(1) { ["marker"]=> string(19) "2020-08-24 14:48:25" } Actual result: -------------- string(20) "sessid in $_COOKIE :" string(32) "a6f0a72f144fa887ad90d2bd75781030" string(15) "session_id() : " string(32) "44826965ac893f140b99806f74762d13" array(0) { } array(1) { ["marker"]=> string(19) "2020-08-24 14:49:08" }