php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17622 session_register-session_is_registered does'nt work with register_globals=on
Submitted: 2002-06-06 05:39 UTC Modified: 2002-10-18 01:00 UTC
Votes:14
Avg. Score:4.7 ± 0.6
Reproduced:12 of 12 (100.0%)
Same Version:11 (91.7%)
Same OS:9 (75.0%)
From: frax at axnet dot nu Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.1.2 OS: Debian GNU/Linux 3.0,kern2.2.17
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: frax at axnet dot nu
New email:
PHP Version: OS:

 

 [2002-06-06 05:39 UTC] frax at axnet dot nu
session_register - session_is_registered
doesn't work for global variables with
"register_globals = on" on the sparc arch.

The set.php - get.php scripts at the end of this report
works just fine om my Debian GNU/Linux 3.0, kernel 2.4.18
on i386, but doesnt work on my Debian GNU/Linux 3.0, kernel 2.2.17 on sparc.

Both machines runs Apache 1.3.24 and PHP 4.1.2 and got identical php.ini files.

The scripts:
--- set.php ---------------------------------------------
<?php
@session_destroy();
$cookie_params = session_get_cookie_params();
setcookie(session_name());
session_start();
$globvar= true;
session_register ('globvar');
print '<A HREF="get.php">get.php</A>';
?>

--- get.php ---------------------------------------------
<?php
session_start();
if(session_is_registered('globvar')) { 
        print 'ok';
} else {
        print 'failed';
}
?>

---------------------------------------------------------
On the i386 I get ok and on the sparc failed.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-02 01:18 UTC] sas@php.net
Does your sparc installation use a 64bit data model?
 [2002-10-02 02:43 UTC] frax at axnet dot nu
Nope, it's an old Sparc Station 5 (sun4m).
It's now upgraded with a 2.4.18 kernel ... same result.
 [2002-10-02 06:18 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-10-18 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, 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".
 [2003-01-06 23:39 UTC] csmall at enc dot com dot au
Here is my test code, I get the same problem

<?
session_start();
var_dump($_SESSION);
print " <-- before SID is ".SID." and after -->";
$_SESSION['blah'] = "foo";
var_dump($_SESSION);
?>
<br><a href="test.php?<?php echo SID?>">blah</a><p>

The result is always the first var_dump is NULL, SID is blank and the second var_dump looks like what it should.  Testing the same script on 4.2.1 alpha arch it works as is expected.

Debian GNU/Linux system
kernel 2.4.18 on sparc64 arch
php4 4.1.2-4
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC