Quick tip for those of us unfortunate enough to have to deal with “legacy” php code (Ruby is Sooo much easier!).

One of my ISPs recently upgraded the PHP installation to 4.4.5 and suddenly my php application stopped. Nothing in the error log, no output to the browser.

I discovered that an attempt to session_register an unitialised variable causes that build of PHP to segfault.

For example…

Will cause a segfault

c7d3e70e8b603e29d4e195e32548f56a004

No segfault

c7d3e70e8b603e29d4e195e32548f56a005

I do not know if this is a generic issue or a consequence of the particular ISP’s build. But, I hope that this will help anyone else whose PHP application mysteriously stops!

Technorati Tags: