HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   suPHP problem after PHP upgrade - ubuntu (http://www.howtoforge.com/forums/showthread.php?t=17961)

SupuS 3rd December 2007 14:38

suPHP problem after PHP upgrade - ubuntu
 
Hi all

Few days ago I installed new version of php on my ubuntu feisty server with suPHP extension. But after sucessfully upgrade I get a lot of php5-cgi segmentation fault errors in /var/log/messages:

Code:

Dec  3 14:11:58 s1 kernel: [4978293.463308] php5-cgi[16717]: segfault at 0000000026f2db60 rip 00002ada293b6640 rsp 00007fff83c0aa88 error 4
After that I found index.php files on zencart installations which returns this error. If I go directly to page with this index.php I get apache 500 error. In apache error.log is this line:

Code:

Premature end of script headers: index.php
I have a lot of same installations of this application but only some of them returns error. All index.php files are same.

For this time I solved this problem by switching off suPHP extension for problematic webs.

I tried recompile suPHP by using this howto http://www.howtoforge.com/suphp_debian_ispconfig but without success.

Has somebody similar problem or idea how to solve this?

Thanks .. SupuS

Here is a list of upgraded packages:

Code:

2007-11-29 23:49:34 status installed php5-common 5.2.1-0ubuntu1.5
2007-11-29 23:49:35 status installed php5-cli 5.2.1-0ubuntu1.5
2007-11-29 23:49:36 status installed php5-cgi 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed libapache2-mod-php5 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-xsl 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-xmlrpc 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-tidy 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-sqlite 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-snmp 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-recode 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-pspell 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-mysql 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-mhash 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-gd 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-curl 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php-pear 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5 5.2.1-0ubuntu1.5
2007-11-29 23:49:47 status installed php5-dev 5.2.1-0ubuntu1.5


mbria 7th February 2008 19:31

I falled exactly in the same issue...
 
Hi,

I started to notice this same issue when I installed new applications in my ubuntu ispconfig server with suPHP.

Until now, everything were Drupals and worked like a charm, but yesterday I saw this issue in a joomla site with mediawiki integration (mediawiki was the culpit) and today the same happens with a brand new eGroupWare.

The only clue I got was "Premature end of script headers: index.php" in the broken applications' sites and I also noticed those "segfault" ugly errors in /var/log/messages as :

PHP Code:

Feb  7 19:00:14 kalimero kernel: [12263467.857423php5-cgi[13081]: segfault at 000000005060a0b8 rip 00002ad152a11640 rsp 00007fff5a5a5f88 error 4
Feb  7 19
:01:19 kalimero kernel: [12263532.102070php5-cgi[13153]: segfault at 000000007fd4d158 rip 00002b6382154640 rsp 00007fff2ae63848 error 4
Feb  7 19
:02:48 kalimero kernel: [12263621.548864php5-cgi[13241]: segfault at fffffffff8af5780 rip 00002ab6faefd640 rsp 00007fffb20b9ab8 error 4
Feb  7 19
:03:21 kalimero kernel: [12263654.077000php5-cgi[13270]: segfault at 00000000479db0e0 rip 00002b2449de3640 rsp 00007fff631d5648 error 4
Feb  7 19
:18:45 kalimero kernel: [12264577.038306php5-cgi[14258]: segfault at ffffffffab6660e0 rip 00002b58ada6e640 rsp 00007fffff54a9b8 error 4
Feb  7 19
:19:16 kalimero kernel: [12264608.324082php5-cgi[14297]: segfault at ffffffffcf2cd660 rip 00002b28d16d5640 rsp 00007fffdb8e3cc8 error 4 

and at and at /var/log/kernel as:

PHP Code:

Feb  7 04:33:24 kalimero kernel: [12211510.612907php5-cgi[29733]: segfault at ffffffffb917fb20 rip 00002ab0bb586640 rsp 00007ffff1a33408 error 4
Feb  7 04
:33:34 kalimero kernel: [12211521.145996php5-cgi[29736]: segfault at 0000000049150fe0 rip 00002b2c4b557640 rsp 00007fff61a625e8 error 4
Feb  7 04
:43:43 kalimero kernel: [12212129.551692php5-cgi[30169]: segfault at 000000002d9883e0 rip 00002b1a2fd90640 rsp 00007fff7d227168 error 4
Feb  7 11
:32:36 kalimero kernel: [12236637.488537php5-cgi[18875]: segfault at ffffffff89be1848 rip 00002b3a80096640 rsp 00007fff2cf2e068 error 4
Feb  7 19
:00:14 kalimero kernel: [12263467.857423php5-cgi[13081]: segfault at 000000005060a0b8 rip 00002ad152a11640 rsp 00007fff5a5a5f88 error 4
Feb  7 19
:01:19 kalimero kernel: [12263532.102070php5-cgi[13153]: segfault at 000000007fd4d158 rip 00002b6382154640 rsp 00007fff2ae63848 error 4
Feb  7 19
:02:48 kalimero kernel: [12263621.548864php5-cgi[13241]: segfault at fffffffff8af5780 rip 00002ab6faefd640 rsp 00007fffb20b9ab8 error 4
Feb  7 19
:03:21 kalimero kernel: [12263654.077000php5-cgi[13270]: segfault at 00000000479db0e0 rip 00002b2449de3640 rsp 00007fff631d5648 error 4
Feb  7 19
:18:45 kalimero kernel: [12264577.038306php5-cgi[14258]: segfault at ffffffffab6660e0 rip 00002b58ada6e640 rsp 00007fffff54a9b8 error 4
Feb  7 19
:19:16 kalimero kernel: [12264608.324082php5-cgi[14297]: segfault at ffffffffcf2cd660 rip 00002b28d16d5640 rsp 00007fffdb8e3cc8 error 4 

Did you find a fix for this? I full understand why you added the word "urgent" in your post. It's a really frustrating situation been unsure when your service could crash.

The server is a ubuntu-feisty that it's completely up to date... and I installed following "ispconfig-ubutuntu perfect setup" of howtoforge forums and Hans suPHP Debian's howto

Millions of thanks in advance for your help,

m.

SupuS 7th February 2008 19:48

Hi

Unfortunately I didn't find sollution. I switched off suPHP feature. Only one relevant thing what I found in suPHP faq is:

Quote:

Why do my scripts not work and why do I get an "Premature end of script headers" in the error_log?
You probably have installed the CLI version of PHP, but you need the CGI version. Copy the file /build/path/sapi/cgi/php to /where/ever/you/have/installed/bin/php to use the CGI version.
Test it if you can. I don't tried it because I don't think that it is the problem and tests on production server is not so good idea. Everything worked fine before php upgrade so I think that it is some kind of non compatibility between php and suPHP. I would like test and solve this on new server next week. suPHP is wery nice tool for joomla, zencart and some other OS hosting so I need it :)

mbria 7th February 2008 20:29

> Unfortunately I didn't find solution. I switched off suPHP feature.

Funny. :-)
This is just what I was doing right now, and obviously works.
Good enough until we find a better solution or the issue is magically fixed on next upgrade.
BTW, do you think a dist-upgrade will help on this? I didn't review gutsy packages but it should include newer php versions that probably fix the issue.

> Test it if you can. I don't tried it because I don't think that it is the problem and tests on production server is not so good idea.

Funniest !! :-)

It's exactly my situation.
I have been crossing my fingers while reinstalling suPHP in the production server as I suspect you did.

I will check your suggestion in the testing server as soon as I find time for it, but I'm really curious about the "segmentation fault".

Could it be related with php time or memory limits?

I don't know yet about eGroupWare but Joomla-MamboWiki issue was related with an intensive backtrace function.

Falko: don't you have any comment about this issue?

Keep in touch and thanks a lot for your answer,

m.

SupuS 7th February 2008 20:47

Quote:

BTW, do you think a dist-upgrade will help on this?
I hope for this .. or may be after next php upgrade this error disappear .. because I am sure it came because of php upgrade.

mbria 7th February 2008 21:39

Quote:

because I am sure it came because of php upgrade.
Me too, but I didn't find any reference anywhere to this segfault related with our php 5.2.1 and suPHP 0.6.2 :-(

Hans had a similar problem last April and with Falko and Till help arrived to the same conclusion: Disable suPHP on the affected sites.

http://www.howtoforge.com/forums/sho...t=12057&page=2
(Posted to let others find a temporally solution)

Certainly it all doesn't looks promising.

Cheers,

m.

mbria 21st May 2008 21:36

Upgrade fixes the issue
 
Today I got time to review this old issue.

Upgrading to a newer php5-cgi release fixes the issue. My old php5-cgi_5.2.1-0ubuntu1.5 (64 bits) include a known issue that causes the segfault.

Although is not a clean solution (a full system upgrade is recommended) it did the job:

$ dpkg -i php5-cgi_5.2.3-1ubuntu6.3_amd64.deb

The new package (that is not the last release) could be downloaded here: http://ubuntu.interlegis.gov.br/ubun...l/main/p/php5/

System warns that is unable to configure php5 due dependences, but last config was fine.

Any case, remember to backup your former .debs, just in case you need to rollback and something is missed in repositories.

Cheers,

m.


All times are GMT +2. The time now is 18:15.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.