PHP 会话的最大大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4649907/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Maximum size of a PHP session
提问by Roch
What is the maximum size that can be stored in a PHP session?
PHP 会话中可以存储的最大大小是多少?
回答by Rudu
You can store as much data as you like within in sessions. All sessions are stored on the server. The only limits you can reach is the maximum memory a script can consume at one time, which by default is 128MB.
您可以在会话中存储任意数量的数据。所有会话都存储在服务器上。您可以达到的唯一限制是脚本一次可以消耗的最大内存,默认情况下为 128MB。
(Similar answers: Ideal PHP Session Size?- some useful comments)
(类似的答案:理想的 PHP 会话大小?- 一些有用的评论)
回答by webbiedave
This is limited by max file size of your operating system (if storing session to file) or column size (if storing session to database).
这受操作系统的最大文件大小(如果将会话存储到文件)或列大小(如果将会话存储到数据库)的限制。
Using custom handlers, it is possible to have a session file that is greater in size than the amount set in memory_limit
.
使用自定义处理程序,会话文件的大小可能大于memory_limit
.
Therefore, it is a combination of max file/column size and memory limit.
因此,它是最大文件/列大小和内存限制的组合。