Hi
Ich habe ein Problem mit Apache2 und fastCGI bzw. Fcgid. Ich will im normalen Server per mod_php PHP haben, und in einem speziellen Directory PHP 5.2.1. Soweit, so gut. PHP überalll fuktioniert, das binary für 5.2.1 ist auch als FastCGI konmpiliert und läuft (phpinfo enthält nur komischerweise nicht da komplette ./configure-Statement). Nur in dem Directory gibts einen 500 bei jeder PHP-Datei und im Error_log
[Mon Feb 12 13:22:13 2007] [notice] mod_fcgid: call /var/www/html/php5.2.1/phpBB2/index.php with wrapper /usr/local/php5.2.1/bin/php
[Mon Feb 12 13:22:13 2007] [notice] mod_fcgid: server /var/www/html/php5.2.1/phpBB2/index.php(28858) started
[Mon Feb 12 13:22:13 2007] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Mon Feb 12 13:22:13 2007] [error] [client 127.0.0.1] Premature end of script headers: index.php
X-Powered-By: PHP/5.2.1
Content-type: text/html
[Mon Feb 12 13:22:16 2007] [notice] mod_fcgid: process /var/www/html/php5.2.1/phpBB2/index.php(28858) exit(communication error), terminated by calling exit(), return code: 0
Das Logllevel ist natürlich debug ;)
Der Directory-Abschnitt in der httpd.conf
<Directory /var/www/html/php5.2.1>
AddHandler fcgid-script .php
FCGIWrapper /usr/local/php5.2.1/bin/php .php
Options +ExecCGI -MultiViews +Indexes
Order allow,deny
AllowOverride All
Allow from all
Deny from None
</Directory>
# This is the Apache server configuration file for providing FastCGI support
# through mod_fcgid
#
# Documentation is available at http://fastcgi.coremail.cn/doc.htm
LoadModule fcgid_module modules/mod_fcgid.so
# Use FastCGI to process .fcg .fcgi & .fpl scripts
# Don't do this if mod_fastcgi is present, as it will try to do the same thing
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>
# Sane place to put sockets
SocketPath run/mod_fcgid
MaxRequestsPerProcess 500
# This is the Apache server configuration file for providing FastCGI support
# through mod_fcgid
#
# Documentation is available at http://fastcgi.coremail.cn/doc.htm
LoadModule fcgid_module modules/mod_fcgid.so
# Use FastCGI to process .fcg .fcgi & .fpl scripts
# Don't do this if mod_fastcgi is present, as it will try to do the same thing
<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>
# Sane place to put sockets
SocketPath run/mod_fcgid
MaxRequestsPerProcess 500
Dist ist Fedora Core 6: Könnt ihr mir helfen/braucht ihr mehr Input? Ich bin nur ratlos, was da los ist.
MfG
Corni
Hi
in der frisch gecleanten error_log sind Debug-Infos beim starten drin, deshalb, das ist schon Loglevel debug ;) Und eine suexec.log ist bei mir nicht vohanden, zumindest nicht in /var/log oder /var/log/httpd.
MfG
Corni
Und ich habe keine vhosts, das ist ne Workstation. Ich kann morgen noch eine von Kommentaren bereinigte httpd.conf posten, aber jetzt gehts nicht mehr ;)
MfG
Corni
edit: 1. als root, 2. kommt morgen als root, oben ist normaler benutzer
Last edited by corni on 2007-02-13 07:04, edited 1 time in total.
Hi
Ich habe das mod_fcgid mit apt-get installiert, und ging deshalb mal davon aus, das es dann läuft. Was müsste Ich denn machen, das da was ausgespuckt wird (Ich habe ehrlich gesagt, kein Ahnung, wonach da gesucht wird, kase hat nur was von einem Socket gesagt)?
MfG
Corni
Es ist zwar nicht unbedingt so, dass suexec in deinem Fall viel bringen würde, aber vielleicht haben wir so eine genauere Fehlermeldung, falls es Probleme mit dem Starten des php-Bins gibt. (in der suexec.log)
PS: ich bin etwas irritiert, weil du keine vHosts hast. Eine Konfiguration komplett ohne vHosts habe ich noch nicht so oft gesehen. Bisher habe ich immer den Default-vHost bei so etwas benutzt, der ja bei Debian auch standardmäßig dabei ist.
Edit: Wegen dem Socket. Da bei dir kein CGI Socket existiert, startet dein php-Bin vermutlich nicht.
Das sit so aus der bashhistory. ./configure und make jeweils unter dem user corni, make install dann unter root. hast du ne Ahnung, was da falsch dran ist?
MfG
Corni
Hmm, auf den ersten Blick sieht das ganz ok aus eigentlich, kann jetzt nicht sagen, warum er es nur als CGI baut.
Das --disable-cli kannst du ruhig weglassen, du hast dann sowohl ein CLI als auch ein CGI-FCGI Binary.
Ansonsten schau mal ins Configure Help, vielleicht hat sich ein Parameter geändert. cgi kannst du auch enablen, denn es ist kein Problem mehr heutzutage, die Binarys CGI-FCGI zu bauen, also beides. (siehe mein php -v)
Vorher hat er einfach kein fastcgi mit reingenommen, vielleicht mache ich da mal ein Test, obs die GDlib oder zLib war. Nochmal vielen Dank, ihr, und vor allem kase, habt mir sehr geholfen :)
MfG
Corni