ID:               16043
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Closed
 Bug Type:         Session related
 Operating System: Windows XP
 PHP Version:      4.1.2
 New Comment:

OK - Here's what I'm getting on my windows box running PHP 4.0.5 , and
also, the simple scripted fix I came up with for it:

Symptoms:

It looks like the $HTTP_SESSION_VARS array does indeed contain values
from the session, but values set in the array during the process are
not written into the session. You can only update the session data by
modifying the global literals.

So:

session_register('arse');
$arse = 'working';

Would add $arse to the session data, and the $HTTP_SESSION_VARS;

But:

$HTTP_SESSION_VARS['arse'] = 'working';

Only adds it to the $HTTP_SESSION_VARS array, and not the actual
session data, so the value only exists for the duration of the script
execution.


----HERE'S MY FIX----
This works on my scripts:
Do a kind of backwards iteration over the $HTTP_SERVER_VARS array at
the end of the script. I've placed the following into the end of /cms
and /content on my windows machine:

// $HTTP_SESSION_VARS bugfix
while(list($key , $value) = each($HTTP_SESSION_VARS)){
        session_register($key);
        $$key = $value;
}


Hope this helps somebody.

--
Bluefoot
http://bluefootproject.com


Previous Comments:
------------------------------------------------------------------------

[2002-04-11 13:55:02] [EMAIL PROTECTED]

Same problem, running W2k sp2, IIS5 and PHP 4.1.2 as CGI module

Only first $_SESSION variable appear. Subsequent session variables are
ignored (not set)

------------------------------------------------------------------------

[2002-03-21 19:51:52] [EMAIL PROTECTED]

Everyone,
Please note what didn't work with what kind of code/configuration.

There are many cases that session does not work as it should.

DO NOT ADD ANY ADDIOTIONA COMMENTS.
Report _NEW_ one if you are sure, your problem is _NEW_.


------------------------------------------------------------------------

[2002-03-21 18:47:02] [EMAIL PROTECTED]

FYI:

I've tried 4.2 RC1 and (at least for me) It is not solving this
problem.  Has anyone else gotten sessions to work properly on win2000
platform, apache module, and 4.2RC1 ?

Erik

------------------------------------------------------------------------

[2002-03-20 04:37:08] [EMAIL PROTECTED]

This bug is closed, because it's fixed in the development branch. You
can't expect us to make patches for every bug for every release.
4.2.0RC1 is coming out today, windows binaries will follow shortly.
With this RC you can if the bug is fixed without having to play with
building PHP yourself.

Derick

------------------------------------------------------------------------

[2002-03-20 04:31:20] [EMAIL PROTECTED]

Why isn't this bug re-opened ?!?!?!
CVS HEAD branches?? whuh? The released 4.1.2 has a serious bug, that
isn't solved for de developers in the world. So, it should be open.

As a newbie I spent hours and hours on my scripts trying to figure out
why my session scripts went dead (after all, the chance that it's PHP
bug instead of a script fault is in my case quite small).

Yep: I use Win2000 SP2, Apache 1.3.23, MySQL 3.23.49 and PHP 4.1.2 as
an Apache module (upgrade since this weekend).

Now I read here a CLOSED bug report about exactly my problem. Bug 16102
is stil being analyzed, OK, but to close 16043 seems too hasty to say
the least.

Why isn't this mentioned in an extra 4.1.2 news flash?

When I read 16102 and 16043, all Windows based servers that run
sessions are STILL troubled by this (apache and IIS, PHP CGI and
module).

------------------------------------------------------------------------

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/16043

-- 
Edit this bug report at http://bugs.php.net/?id=16043&edit=1

Reply via email to