php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16167 Variables not passed between pages
Submitted: 2002-03-19 08:35 UTC Modified: 2002-05-03 00:00 UTC
Votes:6
Avg. Score:4.7 ± 0.7
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:0 (0.0%)
From: rohitkaul_2000 at indiainfo dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.1.2 OS: Solaris 8
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-03-19 08:35 UTC] rohitkaul_2000 at indiainfo dot com
We have installed php4.1.2 on iplanet 6.0 Webserver on a Solaris 8 OS.
I have searched high and low everywhere and somehow I have not being able to figure out why my session variables are not working properly even though I have installed the latest php 4.1.2. The following config options were used:

./configure' '-enable-sysvshm=yes' '--enable-sysvsem=yes' '--with-nsapi=/ecomm/iplanet/nes60/product' '--enable-libgcc'

Our application is running fine when we have register_globals=on.

But as soon as register_globals=off is set nothing seems to work.
I couldn't even get these simple scripts working where we have to pass variable values between php pages.
I have tried all approaches as listed below.
##################################
nn1.php

<?
$session_register["newvar"] = 123;
header("Location: nn2.php");
?>   

nn2.php

<?
echo $_SESSION["newvar"];
?>
####################################

Have even tried this variant of nn1.php
nn1.php and it still doesn't work.

<?
$_SESSION["newvar"] = 123;
header("Location: nn2.php");
?>   
#####################################

Urgent help is required because we might have to do a lot of code changes owing to introduction of register_globals=off (because of security guidelines).

Many Thanks
Rohit

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-20 02:26 UTC] rohitkaul_2000 at indiainfo dot com
Sorry about the 2nd line in nn1.php
Probably it should have been:
session_register("newvar") = 123;
Tried this and even this doesn't work.
So nn1.php now becomes:

##################################
nn1.php

<?
session_register("newvar") = 123;
header("Location: nn2.php");
?>   

nn2.php

<?
echo $_SESSION["newvar"];
?>
####################################

Please help required.
\\Rohit
 [2002-04-02 09:27 UTC] yohgaki@php.net
Could you try 4.2.0RC1?
Please visit http://qa.php.net/ for it.
 [2002-05-03 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC