php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28030 see description
Submitted: 2004-04-16 19:40 UTC Modified: 2004-04-16 22:03 UTC
From: myspam_addr at aon dot at Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.3.6 OS: win2k
Private report: No CVE-ID: None
 [2004-04-16 19:40 UTC] myspam_addr at aon dot at
Description:
------------
if you evaluate the code in the
textarea (Reproduce code), it works.
But I've reloaded the page (my be you have to
reload more than two times) and Apache/1.3.24
crash.

If I run the code without the marked
'&' (reference' it run always correct.

Reproduce code:
---------------
<?php

class PTestClass
{
   var $str = "hello, world";
};

   session_start();
   $var = new PTestClass;
   $_SESSION['modules']['test'] = $var;

   if( !isset($_SESSION['m']) ) {
      $_SESSION['m'] = &$_SESSION['modules']['test'];
      //               ^
      
   }

   var_dump($_SESSION['m']);
?>

Expected result:
----------------
see the var_dump outputs.

Actual result:
--------------
apache crashs

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-16 20:11 UTC] myspam_addr at aon dot at
also tested on PHP version 4.3.6.
Is is necessary to relaod the page several times.
 [2004-04-16 22:03 UTC] sniper@php.net
This is expected. Don't do that.



 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Aug 15 19:01:28 2024 UTC