We deployed an application on client site yesterday and we faced a really puzzling problem. Abbiamo implementato una domanda sul sito client ieri e ci trovava di fronte a un problema davvero imbarazzante. Some data stored in session variable ( $_SESSION["messages"] ) was returning the data of a global array $messages . Alcuni dati memorizzati nella variabile di sessione ($ _SESSION [ "messaggi"]) è stato il ritorno dei dati di un array globale $ messaggi. Before deploying we thoroughly tested the project on multiple PHP installations, both on out intranet and on the web. Prima di implementare abbiamo testato in maniera esauriente il progetto PHP su più impianti, sia per le intranet e sul web. We never encountered this PHP bug. Non abbiamo mai incontrato questa PHP bug.

The problem was truly baffling. Il problema è stato veramente sconcertante. I could see what was happening but I couldn’t see where it was happening; the assignment of $messages to $_SESSION['messages'] . Ho potuto vedere che cosa stava accadendo, ma non riuscivo a vedere dove si stava accadendo; l'assegnazione di messaggi a $ $ _SESSION [ 'messaggi']. On a hunch I changed messages to smessages and the problem was solved. Su un hunch ho cambiato i messaggi a smessages e il problema è stato risolto. In other words, I simply renamed the key for the data stored in session ( $_SESSION["smessages"] ). In altre parole, ho semplicemente rinominato la chiave per i dati memorizzati nella sessione ($ _SESSION [ "smessages"]).

I found the clients site is using PHP 4.4. Ho trovato il client sito usa PHP 4,4. Other than that everything is normal. Diverse da quelle che tutto è normale. This is a pretty weird defect that you should be aware of when deploying to 4.4 (and who knows where else). Questo è un difetto piuttosto strano che si dovrebbe essere consapevoli del momento di impiegare a 4.4 (e che sa dove altro).