ID:               20449
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Session related
 Operating System: redhat 7.3
 PHP Version:      4.4.0-dev
 New Comment:

Well, I have the same kind of problem (I try to upgrade from 4.0.4pl1 -
I know I should have done this before)

In my case, I use an iframe to display the results of a search. You can
select the page by clicking a number.

This works well with 4.0.4pl1, not with 4.1.7 or 4.2.2

After some searches, I've finally found out that my session was not
correctly saved (neither in a file nor in a db, I tried both)

I tried to force the write of the session with no better results.

As my session var contains an object, I also suspect the serialize
handler. 
Another possibility is two instances trying to write the session at the
same time (I use the session both in the main page and in the iframe)

At present, I'm wondering if using the wddx serialization would be
better.

I hope this will help to fix the problem.
Regards,


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

[2002-12-04 14:04:05] [EMAIL PROTECTED]

Our objects are fairly complex. Objects w/ local (as much as they can
be) objects and plenty of our friend - the assoc. array.
I was unable to reproduce this issue on my own (maybe you will have
better luck) even though on a normal day I can watch syslog chime out
unserialize errors.
I'd be more then happy to send a session, class definitions, etc. if
needed. Shoot me an e-mail if you need anything.

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

[2002-12-04 12:26:50] [EMAIL PROTECTED]

Hmm..

I'm going to see if I can't reproduce this bug in some form, starting
from the serialize() function... it's possible that serialize() isn't
doing things correctly.

Is this just a array problem? Or has someone also found this error in
objects that don't use arrays?

I'm going to write up some test scripts and see if I can break
serialize()... I'll post my results here.

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

[2002-12-02 07:17:26] [EMAIL PROTECTED]

[General Message - Not Bug Specific]

In the past 12 months, I've raised a number of bugs relating to session
problems that could not be reproduced consistently with the standard
reply of 'its been fixed in CVS/Try CVS version'. I've tried the new
CVS version and problems still continue (but still erratically).

Over time, I've noticed a lot of developers problems (bugs) seem to be
related to the global $_SESSION variable and I personally feel that the
most stable session module is still in PHP version 4.0.6 before
introduction in the 4.1 series.

I'm not a hardened programmer, so this is a call to the current and
previous developers/maintainers to consider a complete design and code
walkthrough of the 'session related' code. Personally, I feel sessions
is one of the key feature areas of PHP and something that needs to be
highlighted to both Zend and the community to be made 'rock-solid'.

Thanks
Nick

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

[2002-11-25 18:22:39] [EMAIL PROTECTED]

After a good weekend we are having an incredible Monday.  My code in
place now uses serialize/unserialize.  I also convert my arrays to
strings with implode/explode before the serialization/unserialization
process.  I don't see any missing information anymore in my session
table.  

I really think the session serialize code is at fault for this bug. 
Specifically I think it simply doesn't handle arrays.  (perhaps objects
but my object simply had the array in it.  Removing the array from the
object and not using objects did not work)

This is an extremely serious bug that was costing us on average of
about 30-50 orders a day.  I am honestly not exaggerating on this
figure.  I tried the CVS version as late as 11-15-2002 and it still had
the bug in it.  Before that I was using the latest 4.2.3 version.

I'd like a little feedback from the developers to at least say they are
looking into it.  I will try to assist in any way I can.  However, as I
have said before, it was very random and I myself never saw my session
disappear.  Also important to note is that I do not rely on Session
Cookies so it is not related to cookies.  

Also, I tried doing the reset(arrayvar) after each session restoration
as suggested on one of the session man pages.  That too did not work. 

I hesitate to say but I really think it would be important to make note
to people that the session code is not reliable.  Perhaps in the man
pages.  I won't go to such length though as to warn them myself though
I feel some duty to do so.  Perhaps the bug only comes into play on
high traffic servers.  Either which way, not relying on the internal
session code has made a huge difference.  That in itself should prove
something.

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

[2002-11-25 11:46:34] [EMAIL PROTECTED]

This seems to be exactly the same problem we are having with one
particular visitor to one of my websites. He always has this problem,
every time he logs in his session expires. I have gone through his
client PC configuration very carefully, and cannot find anything
unusual. What's more odd is that he used to be able to use my site
without problems.

Would this problem manifest itself at random, or would it affect
specific PCs? I had assumed the problem was at his end until I read
this message thread, and it looked strangely familiar.

Jolyon

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

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

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

Reply via email to