Nasty PHP 4.4 Bug in Session Data
We deployed an application on client site yesterday and we faced a really puzzling problem. Some data stored in session variable ( $_SESSION["messages"] ) was returning the data of a global array $messages. Before deploying we thoroughly tested the project on multiple PHP installations, both on out intranet and on the web. We never encountered this PHP bug.
The problem was truly baffling. I could see what was happening but I couldn't see where it was happening; the assignment of $messages to $_SESSION['messages']. On a hunch I changed messages to smessages and the problem was solved. In other words, I simply renamed the key for the data stored in session ( $_SESSION["smessages"] ).
I found the clients site is using PHP 4.4. Other than that everything is normal. This is a pretty weird defect that you should be aware of when deploying to 4.4 (and who knows where else).
Filed under Headline News, How To, Open Source Software, PHP, Tech Note, Web, Web Services |
|
RSS 2.0 |
Trackback this Article
|
Email this Article
You may also like to read |



































