Bug #16102 Updated: >1 session variables not getting set correctly
| From: | uberl0rd at hotmail dot com | Date: | Wed, 20 Mar 2002 22:57:04 +0000 |
| Subject: | Bug #16102 Updated: >1 session variables not getting set correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-3003@lists.php.net to get a copy of this message | ||
ID: 16102
Updated by: uberl0rd@hotmail.com
Reported By: martin_jones@bigfoot.com
Status: Analyzed
Bug Type: Session related
Operating System: Windows 2000/XP
PHP Version: 4.1.2
New Comment:
Using the $HTTP_SESSION_VARS["foo"] = "bar" is all well and good, but
one of the major points about 4.1.x was the new $_SESSION array and its
global scope. Infact it got a big mention on the download page. Its
only fair to put a big mention that its broke in 4.1.2 as I'm sure that
a few devs (myself included) now have broken code using
$_SESSION["foo"] = "bar" which is silly to take back to the old way of
doing it.
Either make a note or release a patch!
FWIW, this happens on Apache 1.2.23 in SAPI mode and Apache 2.0.32 beta
in CGI mode
Previous Comments:
------------------------------------------------------------------------
[2002-03-20 12:55:14] j.sejournet@clair-et-net.com
Using session_start() and setting $HTTP_SESSION_VARS['my_Var'] to any
value mays help.
Here is my code to use the $_SESSION array :
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
session_start();
if (!isset($_SESSION["count"])) {
$HTTP_SESSION_VARS["count"] = 0;
}
$_SESSION["count"]++;
echo $_SESSION["count"];
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PHP Version : 4.1.2
OS : Win2K Server
Webserver : APACHE 1.3.22
PHP running as the php.exe
------------------------------------------------------------------------
[2002-03-19 11:21:04] zimba@hotmale.com
Fix it and release a new version or at least make a note on the
downloadpage.
------------------------------------------------------------------------
[2002-03-19 00:39:08] webdevguy1@yahoo.com
After reading more posts on this subject, I went back and put some
debug code into my application. I see now that the POST variables are
fine; the difficulty is with the session variables. The problem appears
to be somewhere in php4ts.dll, which is copied to \WINNT\system32 as
part of the installation. I mentioned earlier that the version from the
link in http://www.zend.com/zend/week/week77.php was OK.
The link on
that page is now dead.
I'm running:
Apache_1.3.23-Mod_SSL_2.8.7-OpenSSL_0.9.6c
Windows 2000 Pro SP2 + pre-SP3 updates
PHP running as module (php4apache.dll); no CGI
MySQL 4.0.1-alpha-win
This problem with session variables is a big deal, but there is no
warning on the download page for Windows users.
------------------------------------------------------------------------
[2002-03-18 01:49:39] martin_jones@bigfoot.com
FYI: Running Win2K Professional and IIS. PHP running as the php.exe
------------------------------------------------------------------------
[2002-03-17 16:38:08] fseesink@usa.net
This looks similar to what's posted for 16043. In a nutshell, session
variables aren't being stored/updated in v4.1.2.
When posting, it may help the PHP developers to provide info such as
webserver config (e.g., IIS using PHP CGI, Apache using php4apache.dll,
etc.). For example, in BUG#16043, it seemed everyone was using Apache
(mostly the latest version, v1.3.23). Both SAPI module & CGI version
seem to be affected.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16102
--
Edit this bug report at http://bugs.php.net/?id=16102&edit=1