Michael Howell

PHP sinkhole #2: `$_SESSION` entries cannot have a key with pipes in it

Mar 25, 2016

Web at murray-mint dot co dot uk put this comment on the PHP session_write_close page:

If you’re saving data to a session but finding it’s not actually being saved, check and ensure that you’re not assigning any arrays with a key containing the pipe character (|). This will prevent the session data from being serialized and saved.

This bug is still in there six years later. And, while he didn’t mention it, there is no error to indicate that it happened; it’s totally silent.