php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17688 Session Bug with register_globals off
Submitted: 2002-06-10 23:44 UTC Modified: 2002-06-10 23:49 UTC
From: php at hansbauer dot net Assigned:
Status: Closed Package: Session related
PHP Version: 4.1.2 OS: Windows 2000 Apache
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: php at hansbauer dot net
New email:
PHP Version: OS:

 

 [2002-06-10 23:44 UTC] php at hansbauer dot net
Session wont work under Windows when register_globals is off. 

Following example works with register_globals on but when regist_globals is not on it won't work.
The value of register_globals has been changed in .htaccess.

The same script works perfectly under php4.06 under linux with either register_globals on or off.


***File test.php***

<?php
session_start();
$count = 1;
session_register('count');
echo $count; 
?>
 <A HREF="test2.php?<?php echo SID?>">click here</A>




***File test2.php***

<?php
session_start();
$count = $HTTP_SESSION_VARS['count'];
$count = $count + 1;
echo $count; ?>
 <A HREF="test2.php?<?php echo SID?>">click here</A>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-10 23:49 UTC] php at hansbauer dot net
Just found out that bug has already been reported. Sorry!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC