Hello,
I'm not exactly sure where the problem lies, so I will give some basic information first. I can post code and more details if anyone needs...
My site has been running fine on my test and live servers running IIS and PHP5. I recently had to buy a new host, and its a downgrade to php4.3.1 and on Apache.
My script queries mysql and builds 36 objects from the data. Those objects are loaded into an array, and the array is saved as a session variable.
On subsequent pages, the database gets queried again, and I remove the objects from the array and replace them with new objects.
On the new server, the array in the session doesnt load properly, and never changes:
- It takes the first 3 (of 36) objects made by the query and places them in the array.
- Sometimes, in fact, it does contain all 36 objects from the first query, but not always.
- The calls to remove the objects get verified (return true), but the objects do not get removed.
In PHP5,
the objects have a function destroy_this() to remove the objects..so I call
$_SESSION['Array']['Object']->destroy_this().
It works fine.
I know that < php5 handles objects inproperly, so
I have also tried
unset($_SESSION['Array']['Object'])
and tried using $GLOBALS to get to the Object. Every time I try, It gets to the correct Object, it returns true that the Object was removed (My function returns true - I know that unset is a statement),
But No matter what I do, the session always contains the originally queried 3 objects.
Is this a session problem? serialization? Maybe its just some config. issues with the new server?
I don't know what to try next. I have re-written the code 15 times in different ways. All of them work fine on my test server with PHP5, but they never work on the live server
Any help will be greatly appreciated!!