Bug #18559: Session variables not stored when register_globals is off
| From: | jensen at byu dot edu | Date: | Thu, 25 Jul 2002 07:59:18 +0000 |
| Subject: | Bug #18559: Session variables not stored when register_globals is off | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-15132@lists.php.net to get a copy of this message | ||
From: jensen@byu.edu
Operating system: Windows 2000
PHP version: 4.2.2
PHP Bug Type: Session related
Bug description: Session variables not stored when register_globals is off
I discovered this earlier today, and then while reading through the user
comments under "Session handling functions" looking for a solution, I
discovered I wasn't the only one with the same problem.
Here it is:
When register_globals is off (as it should be), under Win2K, Apache
1.3.26, PHP 4.2.2, I cannot for the life of me get session variables to
work as they should. I've read the documentation thoroughly, and can't
find a solution. Here's some sample code (which incidentally runs
perfectly fine on my other web server - Linux, Apache 1.3.26, PHP 4.2.1)
--- page1.php -----------------------
<?
session_start();
$_SESSION['sess_var'] = "Hello World!";
echo "The content of session variable is ";
echo $_SESSION['sess_var'];
?>
<a href = "page2.php">Next page</a>
-------------------------------------
This file outputs correctly what is expected. But next file does not...
--- page2.php -----------------------
<?
session_start();
if (isset($_SESSION['sess_var']))
{
$sess_var = $_SESSION['sess_var'];
echo "The content of \$sess_var is $sess_var";
}
else
echo "The session variable does not exist!
";
?>
So is this a bug specific to PHP 4.2.2? Or only Win 2K? Any help would be
greatly appreciated.
Incidentally, ever since I upgraded from 4.2.0, IE won't display several
of my PHP scripts, while Netscape and Opera will... Hmmm. All I get is an
"Internal Server Error" message... Any suggestions would be great.
-Jon
--
Edit bug report at http://bugs.php.net/?id=18559&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18559&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18559&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18559&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18559&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18559&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18559&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18559&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18559&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18559&r=globals