PHP register_long_arrays session breakage

Strange behaviour that’s taken me ages to track down. I had the situation where I could create a session, but any changes to it were not saved. session_write_close() didn’t help. Eventually I tracked it down: if you have register_long_arrays disabled (as is the default in PHP5), this can happen. Enabling it fixed the problem. A very simple test case didn’t show this problem, so I guess something in my sessions has a dependency on HTTP_GET_VARS or similar, though these vars do not appear anywhere in my code…

Update
Someone pointed me at this bug report which seems very similar to what I’m seeing. Still no solution though.

WinIE ‘feature’

I like to document things that I find annoying so that other people can be annoyed by them too, so here’s one for today: Windows IE doesn’t like window names that have spaces in – any JavaScript that tries to target them will fail. Firefox and Safari don’t have a problem with them.