|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[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
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
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