php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5870 Variable variables cannot be registered
Submitted: 2000-07-31 13:44 UTC Modified: 2000-09-04 22:35 UTC
From: f dot lovergine at iesi dot ba dot cnr dot ti Assigned:
Status: Closed Package: Session related
PHP Version: 4.0.1pl2 OS: Solaris, Linux
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: f dot lovergine at iesi dot ba dot cnr dot ti
New email:
PHP Version: OS:

 

 [2000-07-31 13:44 UTC] f dot lovergine at iesi dot ba dot cnr dot ti
This code:

session_start();
$var="variable";
$variable="value";
$$var="value";
session_register($var);

does not work: the content of $variable is not 
saved in current session.
transparent session id is enabled.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-31 13:47 UTC] f dot lovergine at iesi dot ba dot cnr dot ti
The code should be read:

ession_start();
$var="variable";
$$var="value";
echo "\$variable=".$$var;
session_register($var);
 [2000-07-31 14:01 UTC] waldschrott@php.net
could not verify
please check if track_vars is "on" and register_globals is "off", then you're only able to access them via
$HTTP_SESSION_VARS['variable']='test';

 [2000-08-25 12:22 UTC] f dot lovergine at iesi dot ba dot cnr dot ti
both the two variable you cited are ON.
As in the example, the variable 'variable' is saved,
but its value (should be 'value') is empty.
 [2000-08-25 16:20 UTC] waldschrott@php.net
I still can?t reproduce this, are you sure a cookie gets set?







 [2000-08-28 03:53 UTC] f dot lovergine at iesi dot ba dot cnr dot ti
both the two variable you cited are ON.
As in the example, the variable 'variable' is saved,
but its value (should be 'value') is empty.
 [2000-08-28 04:33 UTC] f dot lovergine at iesi dot ba dot cnr dot ti
both the two variable you cited are ON.
As in the example, the variable 'variable' is saved,
but its value (should be 'value') is empty.
 [2000-09-04 22:35 UTC] sniper@php.net
I can not reproduce this with latest CVS.
Please try php4.0.2 or latest CVS and reopen if problem still exists.
(And check that your browser has cookies enabled..)

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC