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
 [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-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 03 20:05:54 2022 UTC