php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20703 session object's array is restored corruptly
Submitted: 2002-11-28 13:57 UTC Modified: 2002-12-14 01:00 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: khayll at motoros dot hu Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.2.2 OS: debian woody latest
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: khayll at motoros dot hu
New email:
PHP Version: OS:

 

 [2002-11-28 13:57 UTC] khayll at motoros dot hu
I'am not sure, if this is a in bug php, could be in my code, but I have looked my code over and over and could not find anything...

So I describe my problem:

I have a session object, and it has an array variable.
In the code I do some array_shift, and array_push on one of the elements of this array, wich is also an array. And I do something like this:

"get" return by reference from the session objects array:
$keyArray=&$object->get("key");

then I do array_shift, and array_push to maintain a FIFO like thing to store the previous pagenames.

Now the problem:

normally this works in a number of pages, but in case of one page it acts strangely: for some reason an extra element into the array appears like this:

normally the array values should change when going from page5 to page6

from (now I am on page5):

page1
page2
page3
page4
page5

into (here there is a request for a new page: page6):

page2
page3
page4
page5
page6

but instead !!! it changes to:

page1
page5
page1
page6
page1


I tried to track down where this happens, and I found out, that is happening between the __sleep and __wakeup methods, which would mean, that serialize, and unserialize does not work correctly.

Another wery strange thing is that this work perfecly on the local development server, which runs the same version of php...


so that's it... I am going mad now! bye..

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-29 00:57 UTC] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2002-12-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 13:01:30 2024 UTC