php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34845 sessions segfault when storing objects
Submitted: 2005-10-13 01:22 UTC Modified: 2005-10-21 01:00 UTC
From: jmund at miqs dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 5.0.5 OS: freebsd 5.4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jmund at miqs dot com
New email:
PHP Version: OS:

 

 [2005-10-13 01:22 UTC] jmund at miqs dot com
Description:
------------
Hello.
I just upgraded to 5.0.5 and am having trouble storing objects in sessions.  I am running apache 2.0.54.  When I try to store any object into a session I get a segfault like this:
[Wed Oct 12 16:48:24 2005] [notice] child pid 1735 exit signal Segmentation fault (11)

Below sample should be adding text to the output each time page is refreshed, but just segfaults in the log.

Please let me know if I can provide any more information and Thank You!

John




Reproduce code:
---------------
<?
class test{
        var $text;
        function test(){
           $this->text="hey";
        }
        function getText(){
        	return $this->text;
        }
        function setText($text){
                $this->text.=$text;
        }
}
session_start();
if(isset($_SESSION['t']))$t=$_SESSION['t'];
else $t=new test();
$t->setText("you");
$_SESSION['t']=$t;
echo $t->getText();
?>

Expected result:
----------------
Should see heyyou with an extra 'you' on each refresh
like this from a server running 4.3.8:
heyyouyouyouyouyouyouyouyouyouyouyouyouyouyouyou

Actual result:
--------------
Actual result is blank page.. with a segfault in the log.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-13 10:41 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

Works fine here.
 [2005-10-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 06:01:29 2024 UTC