Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #34845 : sessions segfault when storing objects
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 19th April 00:24
php-bugs
External User
 
Posts: 1
Default #34845 : sessions segfault when storing objects



From: jmund at miqs dot com
Operating system: freebsd 5.4
PHP version: 5.0.5
PHP Bug Type: Reproducible crash
Bug description: sessions segfault when storing objects

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.

--
Edit bug report at http://bugs.php.net/?id=34845&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34845&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34845&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34845&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34845&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34845&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34845&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34845&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34845&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34845&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34845&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34845&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34845&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34845&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34845&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34845&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34845&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34845&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34845&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34845&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34845&r=mysqlcfg
  Reply With Quote


  sponsored links


2 19th April 01:38
External User
 
Posts: 1
Default #34845 : sessions segfault when storing objects



ID: 34845
Updated by: tony2001@php.net
Reported By: jmund at miqs dot com
-Status: Open
+Status: Feedback
Bug Type: Session related
Operating System: freebsd 5.4
PHP Version: 5.0.5
New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[2005-10-13 01:22:13] 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.


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=34845&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666