php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75140 session_id max length 255 is too long with filesystem save handler
Submitted: 2017-08-31 18:20 UTC Modified: 2017-08-31 18:33 UTC
Votes:6
Avg. Score:3.8 ± 0.9
Reproduced:6 of 6 (100.0%)
Same Version:1 (16.7%)
Same OS:1 (16.7%)
From: sebastian dot rapetti at alice dot it Assigned:
Status: Open Package: Session related
PHP Version: 7.1.8 OS: Ubuntu 16.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sebastian dot rapetti at alice dot it
New email:
PHP Version: OS:

 

 [2017-08-31 18:20 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-08-31 18:33 UTC] 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
 [2017-08-31 18:33 UTC] sebastian dot rapetti at alice dot it
Summary grammar error fixed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC