PHP 会话错误:“文件太大" [英] PHP session error: “File too large”

查看:34
本文介绍了PHP 会话错误:“文件太大"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 php 网站.在浏览我的网站时,有时主页会显示一条警告消息,见下文

I have a php web site. While browsing my site, sometimes home page displays a warning message see below

警告:session_start()[function.session-start]:打开(/数据/tmp/sess_cf04f579f3929206a5af1b25e0bb6fd0,O_RDWR) 失败:文件太大 (27)/htdocs/index.php 第 1 行

Warning: session_start() [function.session-start]: open(/data/tmp/sess_cf04f579f3929206a5af1b25e0bb6fd0, O_RDWR) failed: File too large (27) in /htdocs/index.php on line 1

我不知道这是什么?

我已经开始

<?
session_start( );
?>

我们在 Session 中只设置了一些值(存储 10 个变量).这是个问题吗 .如果是这样,会话变量的最大数量是多少

we have set only some values in Session( store 10 variables). Is it a problem . if it so what is the maximum number of session variables

推荐答案

错误信息

文件太大

听起来您在会话中存储了大量的数据 - 事实上,文件系统无法再处理它们(这会暗示大小超过 2 或 4GB!)

sounds like you are storing huge amounts of data in sessions - so much, in fact, that the file system can't deal with them any more (which would hint at sizes beyond 2 or 4 GB!)

您必须查看您存储的数据,并找到不同的存储方式.

You would have to look at the data you are storing, and find a different way of storing it.

另一个原因可能是 tmp 目录已达到某种配额.那将属于服务器管理员的部门来解决.

Another reason for this could be that the tmp directory has reached a quota of some sort. That would fall into the server administrator's department to fix.

更新:看到另一位用户在一分钟前问了同样的问题,这也可能是大型提供商的某种服务器问题......在这种情况下,请联系该提供商.

Update: Seeing as another user asked the very same question a minute ago, this could also be some kind of server problem at a very large provider.... In that case, contact that provider.

这篇关于PHP 会话错误:“文件太大"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆