PDA

View Full Version : Error with suExec + FCGI


jado
22nd April 2009, 12:27
Hello all,

I folowed The Perfect Server - Debian Lenny (Debian 5.0) [ISPConfig 3] tutorial here:
http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3

Everthing is working great, but when I enable suExec (I want to run php with users permissions, not with www-data) from the ISPConfig3 I start getting errors: ERROR 500 - Internal Server Error!

Apache error log says:
[warn] (104)Connection reset by peer:mod_fcgid: read data from fastcgi server error.
[error] [client 74.212.42.75] Premature end of script headers: index.php

If I disable suExec in ISPConfig it starts working again.

Anybody knows what is the problem?

till
22nd April 2009, 14:14
Please take a look in the error log of the website were you enabled suexec.

jado
22nd April 2009, 14:19
This is the error log file of the site in question:

[warn] (104)Connection reset by peer:mod_fcgid: read data from fastcgi server error.
[error] [client 74.212.42.75] Premature end of script headers: index.php
[warn] mod_fcgid: read data timeout in 40 seconds
[error] [client 74.212.42.75] Directory index forbidden by Options directive

falko
24th April 2009, 00:27
That sounds as if the FastCGI server isn't running. Did you try to restart Apache?

jado
24th April 2009, 10:47
I restarted apache, but it does not help.

I noticed there is a suexec.log file in /var/log/apache2:

[2009-04-24 07:34:52]: target uid/gid (5003/5003) mismatch with directory (5003/5004) or program (5003/5003)
[2009-04-24 07:34:53]: uid: (5003/web2) gid: (5003/client1) cmd: .php-fcgi-starter
[2009-04-24 07:34:53]: target uid/gid (5003/5003) mismatch with directory (5003/5004) or program (5003/5003)
[2009-04-24 07:34:54]: uid: (5003/web2) gid: (5003/client1) cmd: .php-fcgi-starter
[2009-04-24 07:34:54]: target uid/gid (5003/5003) mismatch with directory (5003/5004) or program (5003/5003)

till
24th April 2009, 12:06
Looks as if your directory or file is owned by the wrong user. Please chown the directory and file to the web admin user and group of this site.

jado
24th April 2009, 13:43
Thanks! Is was a permission problem. The group permission on folder was client0, but should have been client1.

There is however still a problem of timeout. The script timeouts after 40 seconds, however this value is not in php.ini. How can I increase it?