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
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: peer at earthling dot net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 08 23:01:32 2025 UTC