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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 17:01:28 2025 UTC