Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP session_start open failed: File too large (27)

Status
Not open for further replies.

minkisi

Programmer
Dec 10, 2003
11
0
0
US
My PHP script has a login form - after the id & pw are verified, I do session_start(), then set the session variables and go to the AdminMain.php script, as follows:
session_start();
$admin_id = $row[0];
$_SESSION['login_type'] = $login_type;
$_SESSION['admin_id'] = $admin_id;
$_SESSION['login_type'];
session_write_close();
header ("Location: AdminMain.php");
exit();

I'm getting the warning:
Warning: session_start(): open(/services/webdata/php_sessions/sess_846ebd117fee9006ac52971575a777c7, O_RDWR) failed: File too large (27) in /services/webpages/e/a/eastcoastsalon.com/public/Administration/AdminLogin.php on line 60

Line 60 is the session_start(); command.

This just started happening. The code has been running fine up to now. I've tried destroying the session before the session_start() but it says there's no session to destroy. What can be causing this?
Thanks fo any help.
Marilyn
 
It sounds like the error is pretty straightforward. The filesize of that session store is too large.

Did you go to /services/webdata/php_sessions/ and delete the file sess_846ebd117fee9006ac52971575a777c7 ?

If you haven't already, look and see what the size of the file is before you do it.

If you don't have permission to arbitrarily delete files in that directory, you might try deleting the session cookie that PHP has stored on your browser. That way, PHP will issue you a new cookie and create a new session store file when it executes session_start().

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Thanks for your reply.

I can't get to that file as far as I can see.
Doesn't the session and cookie get destroyed/deleted when the browser is closed? That is what I understand from reading books and many of the posts on this thread. I checked phpinfo.php on the server and these are the settings:

session.cookie_lifetime = 0 (which I understand means for the life of the browser)
session.gc_maxlifetime = 1440 (which I understand is the lifetime in seconds of the session)

Shouldn't a new session start when someone opens a new browser window? Does that mean the session file should be empty at that time, or not even exist and be created just for the new session?

I tried starting a session as the first thing in the script, then emptying its array & destroying it, but I get the same error on the session_start(). It's like it keeps using the same session file and appending to it but I wouldn't know without seeing the file.

I though I understood this but now I'm not so sure...

I emailed my server support to see if I can get to that file and see what's in it.
Thanks for your help.

Marilyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top