Bug 185357 - local variables clobber session variables
Summary: local variables clobber session variables
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: php
Version: 4.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Joe Orton
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-13 22:53 UTC by Jason Bradley Nance
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-21 11:30:19 UTC
Target Upstream Version:
Embargoed:


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

Description Jason Bradley Nance 2006-03-13 22:53:14 UTC
Description of problem:
Local variables clobber session variables.

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

How reproducible:
Always.

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

<?php
session_start();
$_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 22:53:14 UTC
Created attachment 126076 [details]
Script that will reproduce the bug.

Comment 2 Jason Bradley Nance 2006-03-13 22:54:44 UTC
Sorry, that should say under "Additional info" that register globals *is* off
(not if).

Comment 3 Jason Bradley Nance 2006-03-16 17:57:19 UTC
I am an idiot...

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

*sigh*

Please close this bug as I'm not the owner and bugzilla won't allow me to.

Comment 4 Joe Orton 2006-03-21 11:30:19 UTC
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.