LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-15-2008, 02:28 PM   #1
70mas
Member
 
Registered: Sep 2006
Location: Slovakia
Distribution: Debian, Gentoo
Posts: 34

Rep: Reputation: 15
apache 2.2.8, mod_fcgid 2.2 and php-cgi 5.2.6 processes die


Hello

I have a problem with apache 2.2.8, mod_fcgid 2.2 and php-cgi 5.2.6.

The php-cgi processes which should be preforked just die and are not able to produce output.
I get 503 Service Temporarily Unavailable error and error_log says:

Code:
[Sat Mar 15 20:31:48 2008] [notice] mod_fcgid: call /var/www/localhost/htdocs/mysql/index.php with wrapper /var/www/localhost/cgi-bin/php5
[Sat Mar 15 20:31:49 2008] [notice] mod_fcgid: call /var/www/localhost/htdocs/mysql/index.php with wrapper /var/www/localhost/cgi-bin/php5
[Sat Mar 15 20:31:49 2008] [notice] mod_fcgid: process /var/www/localhost/htdocs/mysql/index.php(6100) exit(server exited), terminated by calling exit(), return code: 255
[Sat Mar 15 20:31:49 2008] [notice] mod_fcgid: process /var/www/localhost/htdocs/mysql/index.php(6097) exit(server exited), terminated by calling exit(), return code: 255
I have tested the wrapper from command line and works.

/var/www/localhost/cgi-bin/php5 -v says:
Code:
PHP 5.2.6RC1-pl1-gentoo with Suhosin-Patch 0.9.6.2 (cgi-fcgi) (built: Mar 14 2008 20:59:48)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Suhosin v0.9.23, Copyright (c) 2007, by SektionEins GmbH
so the fcgi support is available.

The apache runs in prefork mpm, the modules mod_fcgid and mod_suexec are loaded and the configuration of the vhost is:

Code:
<VirtualHost *:80>
    ServerAlias some.site.com
    ServerAdmin admin@some.site.com
    DocumentRoot /var/www/some.site.com/htdocs
    
    # PHP SUEXEC
    SuexecUserGroup #3000 #3000
    <Directory /var/www/some.site.com/htdocs>
        AddHandler fcgid-script .php .phtml .php5 .php4
        FCGIWrapper /var/www/localhost/cgi-bin/php5 .php
        FCGIWrapper /var/www/localhost/cgi-bin/php5 .phtml
        FCGIWrapper /var/www/localhost/cgi-bin/php5 .php5
        FCGIWrapper /var/www/localhost/cgi-bin/php4 .php4
        Options ExecCGI
    </Directory>
    DefaultMaxClassProcessCount 1
    DefaultMinClassProcessCount 1
</VirtualHost>
I have been battling with this for a day and still cant find the solution. Googling doesnt find anything relevant. Your help would be very appreciated.

Thank you.
 
Old 03-16-2008, 05:42 PM   #2
jarfil
LQ Newbie
 
Registered: Mar 2008
Posts: 2

Rep: Reputation: 0
You may want to double check you SuexecUserGroup settings.

I've just got a very similar (same?) problem due to a bug in a vhost .conf generating script; the only indication for a missing SuexecUserGroup line was the somewhat cryptic "return code: 255" in error_log, and a lack of matching entries in suexec_log.
 
Old 03-17-2008, 01:11 AM   #3
70mas
Member
 
Registered: Sep 2006
Location: Slovakia
Distribution: Debian, Gentoo
Posts: 34

Original Poster
Rep: Reputation: 15
Hi,

I have come to a solution.

I am running apache server as a non-standard user:group hosting:hosting (the default is apache:apache).
I have checked the /usr/sbin/suexec binary which had owner root:apache. The suexec binary could not even execute, so it wasn't able to make logs. So I had to:

Code:
chown root:hosting /usr/sbin/suexec
After the chown the binary lose the required setuid bit so I also had to:

Code:
chmod +s /usr/sbin/suexec
After that it worked. I have came to this solution through a very painful process trying literally everything. It is the hardest to find a solution when there are no logs.

I hope it helps you

Regards,
Tomas
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2.2.6 / suPHP / PHP-CGI weird issue.... robertjinx Linux - Server 0 10-09-2007 03:25 AM
apache2, processes die and do not fork rjcrews Linux - Software 3 03-18-2006 03:07 PM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
defunct processes appearing...and won't die! Axion Linux - Software 1 03-31-2004 11:43 AM
processes that refuse to die... HELP! frieza Linux - Software 2 02-09-2004 09:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration