php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40436 object references broken in 5.2.1
Submitted: 2007-02-11 07:50 UTC Modified: 2007-02-11 19:11 UTC
From: Jason at V7Studios dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.2.1 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Jason at V7Studios dot com
New email:
PHP Version: OS:

 

 [2007-02-11 07:50 UTC] Jason at V7Studios dot com
Description:
------------
A certain object reference situation that my code depends on has been broken in 5.2.1 on *windows*.  It works on my linux production server running 5.2.1.

Thanks.

Reproduce code:
---------------
class Foo 
{
   private $params = array();
			
   function __set($name, $value){
     $this->params[$name] = $value;
   }
   
   function &__get($name){
     return $this->params[$name];
   }			
}

$foo = new Foo();
$ref =& $foo->bar;
$ref = "This is a test";
print($foo->bar);

Expected result:
----------------
It should print out "This is a test"

Actual result:
--------------
On windows, nothing is printed out.  $foo->bar is not set.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-11 09:17 UTC] tony2001@php.net
Use var_dump() instead of print; set display_errors=On, error_reporting=E_ALL; make sure you've removed old php5ts.dll; look into your web-servers log.
 [2007-02-11 19:00 UTC] Jason at V7Studios dot com
Seems to be a problem specific to XAMPP's installation of PHP 5.2.1.  I copied the dlls from the php zip into the installation directory and then pointed apache to php5apache2_2.dll and it worked.

Why is there a php5apache2.dll (doesn't work) and a php5apache2_2.dll?

Sorry for this erroneous report.  I will never trust a PHP installation unless I do it myself.
 [2007-02-11 19:11 UTC] tony2001@php.net
>Why is there a php5apache2.dll (doesn't work) and a php5apache2_2.dll?

Apache 2.0.x and Apache 2.2.x require different dlls.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 05 22:01:31 2024 UTC