Doc #75140 [Opn]: session_id max length 255 is too long with filesystem save handler
| From: | sebastian dot rapetti at alice dot it | Date: | Thu, 31 Aug 2017 18:33:36 +0000 |
| Subject: | Doc #75140 [Opn]: session_id max length 255 is too long with filesystem save handler | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14944@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75140&edit=1
ID: 75140
User updated by: sebastian dot rapetti at alice dot it
Reported by: sebastian dot rapetti at alice dot it
-Summary: session_id max length off 255 is too long with
filesystem save handler
+Summary: session_id max length 255 is too long with
filesystem save handler
Status: Open
Type: Documentation Problem
Package: Session related
Operating System: Ubuntu 16.04
PHP Version: 7.1.8
Block user comment: N
Private report: N
New Comment:
Summary grammar error fixed
Previous Comments:
------------------------------------------------------------------------
[2017-08-31 18:20:44] sebastian dot rapetti at alice dot it
Description:
------------
Hi
With default filesystem session handler:
When use a custom session_id length as provided from php 7.1 with the options session.sid_length and
set the value near the max value (251..255), operation fails. OS cannot create the file for store
session values because file name is too long.
Test script:
---------------
//session.sid_bits_per_character default value 4
//work, file system has the 5 characters for the sess_ file name part.
ini_set('session.sid_length', '250');
session_start();
//error from 251 to 255
ini_set('session.sid_length', '251');
session_start();
Expected result:
----------------
No error
Actual result:
--------------
With 251
Warning: session_start():
open(/var/lib/php/sessions/sess_ld3d1ome3tco3348uml0d4jpm4761n3i8lqui62t0aapf674jg3cjll4oehpmm1mi5u5r9jdaa3451f49eq541th9iom92qa062k6uviblshi8sdsbt4k1h82ae6c32gk75m87ub0176eugi812e9gbctkr2be8d51r5qno4racnjgtknf9jarcb3v4250p229mtueb1qecft82l9p16p0d1hh9ng7sfvibtvaj7ofbc16cphnc78j3kjmn,
O_RDWR) failed: File name too long (36) in /home/sebastian/html/snippet/test.php on line 6
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75140&edit=1