php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11861 Can't set any session variable
Submitted: 2001-07-03 13:35 UTC Modified: 2001-11-24 19:33 UTC
From: M dot Izydorski at rubikon dot pl Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.6 OS: Win 2k
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: M dot Izydorski at rubikon dot pl
New email:
PHP Version: OS:

 

 [2001-07-03 13:35 UTC] M dot Izydorski at rubikon dot pl
The problem is, that I can't set any session variables when I turn register_globals Off. I read documentation carefully, but following code doesn't work - variable "user" isn't set in main.php. I'm not so sure what's mean of:

PHP DOC> only members of the global associative array
PHP DOC> $HTTP_SESSION_VARS can be registered as session
PHP DOC> variables.The restored session variables will only PHP DOC> be available in the array $HTTP_SESSION_VARS

After execute following code, $HTTP_SESSION_VARS["user"] isn't set in
main.php.


>     $user = $s_user;
>     $HTTP_SESSION_VARS["user"] = $s_user;
>     session_register("user");
>     header("Location: main.php");
>     exit;

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-24 19:33 UTC] sniper@php.net
This is now fixed in CVS. Fix will be in PHP 4.2.0

--Jani


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 11:01:29 2025 UTC