Doc #68221 [Opn->Csd]: session.save_path has bad advice for directory level depths

From: Date: Thu, 23 Oct 2014 19:06:36 +0000
Subject: Doc #68221 [Opn->Csd]: session.save_path has bad advice for directory level depths
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11577@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68221&edit=1 ID: 68221 Updated by: aharvey@php.net Reported by: greenreaper at hotmail dot com Summary: session.save_path has bad advice for directory level depths -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: aharvey Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2014-10-23 19:06:17] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=335126 Log: Add a cautionary note about configuring session.save_path. Fixes doc bug #68221 (session.save_path has bad advice for directory level depths). ------------------------------------------------------------------------ [2014-10-14 01:22:02] greenreaper at hotmail dot com Description: ------------ --- From manual page: http://www.php.net/session.configuration --- The description of session.save_path gives an infeasible suggestion for the depth of the session directory tree: "There is an optional N argument to this directive that determines the number of directory levels your session files will be spread around in. For example, setting to '5;/tmp' may end up creating a session file and location like /tmp/4/b/1/e/3/sess_4b1e384ad74619bd212e236e52a5a174If ." People may try to use this kind of figure without thinking about what they're doing. They probably won't be *able* to create 64^5 directories, but once they find that out, they may be tempted to split the difference - even 64^3 is over 1Gb and 256k inodes on most systems, just for the structure. Something like "If you're considering a value beyond 1 or 2, you may want to look into a different session.save_handler." would be helpful. Also, the dir_indexes option for ext2/3/4 can help with large session directories, though I don't know if PHP gives such specific advice. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68221&edit=1

« previous php.doc.bugs (#11577) next »