|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-25 11:58 UTC] max at ahston dot se
[2002-07-25 11:59 UTC] max at ahston dot se
[2002-07-25 14:39 UTC] max at ahston dot se
[2002-07-26 01:52 UTC] rverlander@php.net
[2002-07-26 03:13 UTC] jensen at byu dot edu
[2002-07-31 00:25 UTC] gharding at oktobor dot com
[2002-09-11 11:05 UTC] jensen at byu dot edu
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 06:00:01 2025 UTC |
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