php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2379 global variables get overwritten (all share a single storage location?)
Submitted: 1999-09-25 04:19 UTC Modified: 1999-09-25 11:53 UTC
From: peer at earthling dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 2 OS: Linux
Private report: No CVE-ID: None
 [1999-09-25 04:19 UTC] peer at earthling dot net
Description:

When I have multiple globals they all seem to share the same storage location. When you have var1 and var2 changing either one's value will change both, etc.

Sample script:

<html>
<body>
<?php
        global $p,$q;

        $p = "1";
        $q = "2";
        
        echo "p=$p, q=$q<br>";
?>      
</body>
</html>

Result:

p=2, q=2

Should be:

p=1, q=2

Modules:

Just followed the quick build described in the INSTALL file. Using Apache 1.3.9 as server.

System Specifics:
Linux kernel 2.2.9
Mandrake 6.0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-25 11:53 UTC] thies at cvs dot php dot net
please try the lastest CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 18:01:31 2024 UTC