Bug 185357 - local variables clobber session variables
local variables clobber session variables
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: php (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2006-03-13 17:53 EST by Jason Bradley Nance
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-21 06:30:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Script that will reproduce the bug. (92 bytes, text/plain)
2006-03-13 17:53 EST, Jason Bradley Nance
no flags Details

  None (edit)
Description Jason Bradley Nance 2006-03-13 17:53:14 EST
Description of problem:
Local variables clobber session variables.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a php script with the following code:

$_SESSION['foo'] = "foo";
$foo = "bar";
echo $_SESSION['foo'];

2. Run the script.

Actual results:
Script outputs "bar".

Expected results:
Script should output "foo".

Additional info:
register_globals if off
Comment 1 Jason Bradley Nance 2006-03-13 17:53:14 EST
Created attachment 126076 [details]
Script that will reproduce the bug.
Comment 2 Jason Bradley Nance 2006-03-13 17:54:44 EST
Sorry, that should say under "Additional info" that register globals *is* off
(not if).
Comment 3 Jason Bradley Nance 2006-03-16 12:57:19 EST
I am an idiot...

There was a .htaccess file turning on register_globals...


Please close this bug as I'm not the owner and bugzilla won't allow me to.
Comment 4 Joe Orton 2006-03-21 06:30:19 EST
Thanks for contacting us.  Glad to hear you tracked the issue down.

Note You need to log in before you can comment on or make changes to this bug.