Small Business Resources

I spend the better part of my time advising Small Business on the ins and outs of Online Marketing. Pop over to eBiz4Results.com for the full story.

Current Project

At the end of 2008, I launched BestMacTools.com where you will find reviews, and commentary mostly related to Productivity Tools for Mac OS X.

For Bloggers

It is now just about axiomatic... the most effective online marketing tool for any business is a Blog. That's why I publish Blog4Results.com.

Feb
23

PHP 4.4.5 segfault fix

By Nigel Ball

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

<?php
session_start();
session_register("logon");
?>

No segfault

<?php
session_start();
$logon = "fred";
session_register("logon");
?>

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!

Categories : Coding

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.