Web Site: http://squarepegsystems.com
A lot of people have problems with PHP the language, but I've never come into this problem before involving the Apache PHP module.
A long time customer got back in touch with me. A web app he's been working on was getting ready to go prime time and they ran a security audit on the server. That audit found several things wrong, and strongly recommended an upgrade to PHP 5.2.10. As of this writing, PHP 5.2.10 was very new and Debian testing didn't even have a package for it yet. So I fiddled around and finally found did the right combination of pinning to install PHP 5.2.10 from unstable. If you are thinking "Yikes!" then you are already ahead of me.
The next day, I get an email saying that their webapp just stops. I get on and, sure enough, sometimes, randomly, you get a blank page. Not a 404, 405, or another error -- just a blank white page. A reload and it works fine. I checked out
/var/log/apache2/error.log and see tons of messages with the following:
[notice] child pid 24483 exit signal Segmentation fault (11)
[notice] child pid 24485 exit signal Segmentation fault (11)
[notice] child pid 24481 exit signal Segmentation fault (11)
[notice] child pid 24489 exit signal Segmentation fault (11)
Oh, that's bad. Playing around with it demonstrates that the seg fault happens when the page doesn't show up — just like I thought.
Now I get into detective mode and try to figure out what the heck is going on. I found DotDeb, which makes fresh Debian packages for older releases -- like PHP 5.2.10 for Debian testing! But the installers of that package was having the same problems I had. By careful reading, it seems that Debian installed at least part of the Suhosin security patch and that seems to be culprit. Users commented that disabling it seemed to stop the seg faults. But how do you do disable it?
I looked at the configurations in
/etc/php5 and there was a file in
suhosin.ini, but no mention of it in the main
apache2/php.ini file (the main PHP config for Apache2 in the Debian world). In a lark I moved
suhosin.ini.bad and restarted Apache. And the problem when away. Like magic.
This is the problem when you are to use the versions. Because sometimes the latest isn't the greatest, and the documentation just can't keep up.
Got something to add? Send me email.
Increase ad revenue 50-250% with Ezoic
More Articles by Mike Hostetler
© 2013-03-02 Mike Hostetler