segmentation fault in PHP

segmentation fault in PHP

Posted by: fulvio
Posted on: 2007-03-05 14:33:00

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:

~/sustainableballard.org/cgi-bin/> ./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?

Re: segmentation fault in PHP

Posted by: khatfield
Posted on: 2007-03-05 18:52:00

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

Re: segmentation fault in PHP

Posted by: Raz2133
Posted on: 2007-03-05 19:08:00

In reply to:

~/sustainableballard.org/cgi-bin/> ./php.cgi ../wiki/index.php title=Press_Kit


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?

Mark

Re: segmentation fault in PHP

Posted by: fulvio
Posted on: 2007-03-06 08:31:00

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 74.6.72.42] Premature end of script headers: /home/sustain/sustainableballard.org/cgi-bin/php.cgi


Re: segmentation fault in PHP

Posted by: fulvio
Posted on: 2007-03-06 08:37:00

It's exactly the same as the DH install. I just followed http://wiki.dreamhost.com/index.php/PHP.ini, 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.

Tags: segmentation faultinternal server error500 internal server errorphp filemediawikicgi binwiki