Segmentation fault in PHP

My MediaWiki installation all of a sudden started returning “500 Internal Server Error”. I tried to run the wiki’s index.php file from the command line, and found that php is dying with a segmentation fault:

~/> ./php.cgi …/wiki/index.php title=Press_Kit
Segmentation fault (core dumped)

Some pages still work, e.g. all of those in the “Special” namespace:
php.cgi …/wiki/index.php title=Special:RecentChanges
works fine, and I can even open them in the browser.

Why would PHP start dumping core all of a sudden?

Hard to say without the logs…I would suggest switching to PHP 5 if you haven’t already, otherwise try it in php 4. If it continues on certain files I would just redownload those files as they maybe causing the problem.

Save [color=#CC0000]$97[/color] on Dreamhost plans by using promo code: [color=#CC0000]SRVR97[/color]

I could be wrong, but the above line suggests you are running a custom PHP install. If so, have you tried switching back to one of the default DreamHost PHP installs for testing?


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)

I was already running php 5, although not sure of which minor version. When PHP dumps core, all you see in the logs is a “premature end of script headers”. That’s why I tried running it from the command line.

[Sun Mar 4 00:05:57 2007] [error] [client] Premature end of script headers: /home/sustain/

It’s exactly the same as the DH install. I just followed, for the reason that is used there, namely to increase the size of uploads. It’s just a copy from /dh/cgi-system. I’ve had it set up like that for several months.

anyway, I’ve upgraded MediaWiki to 1.9.3, and the problem is gone now. But I still don’t know why it happened in the first place. It shouldn’t just start segfaulting on its own, so I blame DH for changing the environment somehow.