php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13554 Storing complex object as session variable makes apache go beserk
Submitted: 2001-10-05 02:54 UTC Modified: 2002-01-27 05:19 UTC
From: mgrommet at hotmail dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.0.6 OS: Redhat Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
21 + 38 = ?
Subscribe to this entry?

 
 [2001-10-05 02:54 UTC] mgrommet at hotmail dot com
Before this, I've started the session, and have included the file defining the Test class.

  session_register("testCache");

  if(!isset($testCache))
  {
     $testCache = new Test($testid);
     echo "Loading non cached...";
  }

It should be noted that an instantiated Test object is really pretty darn hefty and contains arrays of objects in its attributes with many methods.  Total footprint is probably around 150k or so.

The first time this code is executed, testCache is empty
and is created within the body of the if statement

The second time (reload the page for instance) it causes the apache process servicing the request to gobble up insane amounts of memory.  As far as I can tell, apache will never respond back.  On the reload, the session variable should be set


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-05 03:46 UTC] mgrommet at hotmail dot com
It should also be noted that I dont see this problem with much smaller / less complex objects.


 [2002-01-06 20:19 UTC] yohgaki@php.net
Does this happen with PHP 4.1.1?
 [2002-01-27 05:19 UTC] sander@php.net
No feedback.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 22:01:31 2024 UTC