PHP5 als Fcgi
PHP5 als Fcgi
Guten Tag,
Habe versucht anhand diesem HowTo PHP5 als FCGI zu installieren.
http://www.debianhowto.de/de:howtos:sar ... 2_php-fcgi
Bin aber beim Installation von mod_fastcgi auf ein Problem gestossen.
wenn ich make ausführe erscheint folgender Fehler:
In file included from fcgi_config.c:11:
/usr/include/apache2/mpm_common.h:37:17: mpm.h: No such file or directory
fcgi_config.c: In function `get_host_n_port':
fcgi_config.c:43: warning: passing arg 1 of `ap_strchr' discards qualifiers from pointer target type
fcgi_config.c: In function `fcgi_config_new_static_server':
fcgi_config.c:766: warning: long int format, gid_t arg (arg 3)
fcgi_config.c:771: warning: long int format, uid_t arg (arg 3)
fcgi_config.c: In function `fcgi_config_new_external_server':
fcgi_config.c:957: warning: long int format, gid_t arg (arg 3)
fcgi_config.c:962: warning: long int format, uid_t arg (arg 3)
make: *** [fcgi_config.slo] Fehler 1
woran liegt es?
System: SuSe 9.3 Professional
Admin Oberfläche: Plesk 7.54
Apache 2
Strato Image
Vielen Dank im Voraus
Habe versucht anhand diesem HowTo PHP5 als FCGI zu installieren.
http://www.debianhowto.de/de:howtos:sar ... 2_php-fcgi
Bin aber beim Installation von mod_fastcgi auf ein Problem gestossen.
wenn ich make ausführe erscheint folgender Fehler:
In file included from fcgi_config.c:11:
/usr/include/apache2/mpm_common.h:37:17: mpm.h: No such file or directory
fcgi_config.c: In function `get_host_n_port':
fcgi_config.c:43: warning: passing arg 1 of `ap_strchr' discards qualifiers from pointer target type
fcgi_config.c: In function `fcgi_config_new_static_server':
fcgi_config.c:766: warning: long int format, gid_t arg (arg 3)
fcgi_config.c:771: warning: long int format, uid_t arg (arg 3)
fcgi_config.c: In function `fcgi_config_new_external_server':
fcgi_config.c:957: warning: long int format, gid_t arg (arg 3)
fcgi_config.c:962: warning: long int format, uid_t arg (arg 3)
make: *** [fcgi_config.slo] Fehler 1
woran liegt es?
System: SuSe 9.3 Professional
Admin Oberfläche: Plesk 7.54
Apache 2
Strato Image
Vielen Dank im Voraus
Re: PHP5 als Fcgi
ist mal ganz blöd gefragt. ihr könnt mich auch verbessern wenn ich nciht recht habe.
aber: plesk hat hardgecodet seine Syntax zum anlegen einer webpräsenz. Ich meine das diese nicht fastcgi einschließt, das heisst doch das jede virutal datei manuell an fastcgi angeglichen werden müsste. will man das?
nur mal so als frage...
aber: plesk hat hardgecodet seine Syntax zum anlegen einer webpräsenz. Ich meine das diese nicht fastcgi einschließt, das heisst doch das jede virutal datei manuell an fastcgi angeglichen werden müsste. will man das?
nur mal so als frage...
Re: PHP5 als Fcgi
Da hats du recht, ich muss dannn jedem User per Hand in vHost.conf Eintrag machen. Aber ich brauche es nur für ein paar PHP5 als FCGI.
-
Roger Wilco
- Posts: 5923
- Joined: 2004-05-23 12:53
Re: PHP5 als Fcgi
Am fehlenden apache2-devel.test022 wrote:woran liegt es?
Re: PHP5 als Fcgi
ob mir jemand glaubt oder nicht aber wenn ich etwas compilliere fange ich ertsmal mit yast und installiere alle betrofenen dev's
Kann noch irgend ein grund sein?
Kann noch irgend ein grund sein?
Re: PHP5 als Fcgi
Falsch/nicht gesetzte include-Pfade.Kann noch irgend ein grund sein?
cu
Re: PHP5 als Fcgi
Also PHP5 habe ich erfolgreich compiliert :-)
Nun ein anderes Problem:
beim ausführen php5 scripte bekomme ich error 500, und im apache log ist folgender eintrag zu sehen:
Premature end of script headers: php
php5 habe wie folgt in apache includiert:
<Directory "/usr/bin/php5">
Order allow,deny
allow from all
Options ExecCGI
AllowOverride None
</Directory>
AddType application/x-httpd-php5 .php5
ScriptAlias /php/ "/usr/bin/php5/"
Action application/x-httpd-php5 "/php/php/"
was ist Falsch bei include?
Nun ein anderes Problem:
beim ausführen php5 scripte bekomme ich error 500, und im apache log ist folgender eintrag zu sehen:
Premature end of script headers: php
php5 habe wie folgt in apache includiert:
<Directory "/usr/bin/php5">
Order allow,deny
allow from all
Options ExecCGI
AllowOverride None
</Directory>
AddType application/x-httpd-php5 .php5
ScriptAlias /php/ "/usr/bin/php5/"
Action application/x-httpd-php5 "/php/php/"
was ist Falsch bei include?
Re: PHP5 als Fcgi
[2006-03-02 06:37:17]: too few arguments
[2006-03-02 06:37:22]: too few arguments
nur diese 2 Zeilen :-(
[2006-03-02 06:37:22]: too few arguments
nur diese 2 Zeilen :-(
Re: PHP5 als Fcgi
und dein letzter slash ist bei Action ist mit Sicherheit zuviel !
Re: PHP5 als Fcgi
Also habe jetzt Eintrag in vhost.conf so abgeändert wie rOOty es empfohlen hat:
<Directory "/usr/bin/php5">
Order allow,deny
allow from all
Options ExecCGI
AllowOverride None
</Directory>
AddType application/x-httpd-php5 .php5
ScriptAlias /php/ "/usr/bin/php5/"
Action application/x-httpd-php5 "/php/php"
wenn ich jetzt auf info.php5 direkt zugreife meinedomain.de/info.php5
Pfad zu info.php5: /var/www/vhosts/meinedomain.de /httpdocs/info.php
bekomme ich:
Internal Server Error 500
In diesem Fall bleibt es in /var/log/apache2/susexec.log alles beim alten.
Und in /var/log/apache2/error.log kommt folgendes dazu: [Sat Apr 08 01:49:48 2006] [error] [client xx.xxx.xxx.xx] Premature end of script headers: php
Und wenn ich auf info.php5 aus Unterverzeichnis zugreife meinedomain.de/php/info.php5
Pfad zu info.php5: /var/www/vhosts/meinedomain.de/httpdocs/php/info.php
bekomme ich:
Not Found 400
Und in diesem Fall bleibt es auch in /var/log/apache2/susexec.log alles beim alten.
Und hier in /var/log/apache2/error.log kommt folgendes dazu: [Sat Apr 08 01:51:16 2006] [error] [client xx.xxx.xxx.xx] script not found or unable to stat: /usr/bin/php5/info.php5
Vielen Dank im Voraus
<Directory "/usr/bin/php5">
Order allow,deny
allow from all
Options ExecCGI
AllowOverride None
</Directory>
AddType application/x-httpd-php5 .php5
ScriptAlias /php/ "/usr/bin/php5/"
Action application/x-httpd-php5 "/php/php"
wenn ich jetzt auf info.php5 direkt zugreife meinedomain.de/info.php5
Pfad zu info.php5: /var/www/vhosts/meinedomain.de /httpdocs/info.php
bekomme ich:
Internal Server Error 500
In diesem Fall bleibt es in /var/log/apache2/susexec.log alles beim alten.
Und in /var/log/apache2/error.log kommt folgendes dazu: [Sat Apr 08 01:49:48 2006] [error] [client xx.xxx.xxx.xx] Premature end of script headers: php
Und wenn ich auf info.php5 aus Unterverzeichnis zugreife meinedomain.de/php/info.php5
Pfad zu info.php5: /var/www/vhosts/meinedomain.de/httpdocs/php/info.php
bekomme ich:
Not Found 400
Und in diesem Fall bleibt es auch in /var/log/apache2/susexec.log alles beim alten.
Und hier in /var/log/apache2/error.log kommt folgendes dazu: [Sat Apr 08 01:51:16 2006] [error] [client xx.xxx.xxx.xx] script not found or unable to stat: /usr/bin/php5/info.php5
Vielen Dank im Voraus
Last edited by test022 on 2006-04-10 18:45, edited 1 time in total.
Re: PHP5 als Fcgi
so, ich bin wieder zurück aus dem Wochenende :-)
Also folgendes:
mich wundert dass du nicht die Meldung command not in docroot bekommst (suexec.log).
Aber soweit sind wir noch nicht - der Fehler ist wohl noch wo anders.
Hier mal ein Auszug aus der Config von mir, wie es bei mir funktioniert:
Also folgendes:
mich wundert dass du nicht die Meldung command not in docroot bekommst (suexec.log).
Aber soweit sind wir noch nicht - der Fehler ist wohl noch wo anders.
Hier mal ein Auszug aus der Config von mir, wie es bei mir funktioniert:
Code: Select all
ServerName meineDomain.tld
ServerAlias weitereDomains.tld
DocumentRoot /home/htdocs/web28/html/
SuexecUserGroup web28 web28
ScriptAlias /cgi-bin/ /home/htdocs/web28/html/cgi-bin/
Action php5-script /cgi-bin/php5/php
AddHandler php5-script .php5
Re: PHP5 als Fcgi
Also Leute jetzt im Ernst nicht dass, ich jemanden hier veräppeln will.
Aber es ist bei mir total komisch!!!
Habe auch Eintrag wie es rOOty gemacht hat ausprobiert hier sind die Meldungen aus error_log
Habe Datei hier ligen:
meinedomain.tld/php/info2.php5
also im Browser auf die Datei zugegriffen
error_log meldet: /File does not exist: /var/www/vhosts/ meinedomain.tld/httpdocs/php/php/info2.php5
Na gut noch ein Unterordner php erstellt und die Datei dorthin kopiert.
Wieder auf die Datei zugegriffen: meinedomain.tld/php/info2.php5
error_log meldet: /File does not exist: /var/www/vhosts/ meinedomain.tld/httpdocs/php/php/php/info2.php5
noch ein php Unterordner erstellt und die Datei dorthin kopiert.
Wieder auf die Datei zugegriffen: meinedomain.tld/php/info2.php5
error_log meldet: /File does not exist: /var/www/vhosts/ meinedomain.tld/httpdocs/php/php/php/php/info2.php5
Bitte um Hilfe.
Vielen Dank im voraus
PS: im suexec.log wieder keine veränderungen
Aber es ist bei mir total komisch!!!
Habe auch Eintrag wie es rOOty gemacht hat ausprobiert hier sind die Meldungen aus error_log
Habe Datei hier ligen:
meinedomain.tld/php/info2.php5
also im Browser auf die Datei zugegriffen
error_log meldet: /File does not exist: /var/www/vhosts/ meinedomain.tld/httpdocs/php/php/info2.php5
Na gut noch ein Unterordner php erstellt und die Datei dorthin kopiert.
Wieder auf die Datei zugegriffen: meinedomain.tld/php/info2.php5
error_log meldet: /File does not exist: /var/www/vhosts/ meinedomain.tld/httpdocs/php/php/php/info2.php5
noch ein php Unterordner erstellt und die Datei dorthin kopiert.
Wieder auf die Datei zugegriffen: meinedomain.tld/php/info2.php5
error_log meldet: /File does not exist: /var/www/vhosts/ meinedomain.tld/httpdocs/php/php/php/php/info2.php5
Bitte um Hilfe.
Vielen Dank im voraus
PS: im suexec.log wieder keine veränderungen
Re: PHP5 als Fcgi
Du scheinst da irgendwie Schleifen in deinen ScriptAlias und AddHandler Direktiven zu verursachen. Und du hast den Eintrag von rooty nicht komplett übernommen sondern das /php5/php durch ein php/php ausgetauscht, oder?
Re: PHP5 als Fcgi
So habe ich jetzt in meinem vhost.conf stehen:
<Directory "/usr/bin/php5">
Order allow,deny
allow from all
Options ExecCGI
AllowOverride None
</Directory>
ServerName meinedomain.tld
ServerAlias meinedomain.tld
DocumentRoot /var/www/vhosts/meinedomain.tld/httpdocs/
SuexecUserGroup meinftpowner psacln
ScriptAlias /php/ "/var/www/vhosts/meinedomain.tld/httpdocs/php/"
Action php5-script "/php"
AddHandler php5-script .php5
was soll jetzt noch verändert werden, bin wirklich ratlos...
<Directory "/usr/bin/php5">
Order allow,deny
allow from all
Options ExecCGI
AllowOverride None
</Directory>
ServerName meinedomain.tld
ServerAlias meinedomain.tld
DocumentRoot /var/www/vhosts/meinedomain.tld/httpdocs/
SuexecUserGroup meinftpowner psacln
ScriptAlias /php/ "/var/www/vhosts/meinedomain.tld/httpdocs/php/"
Action php5-script "/php"
AddHandler php5-script .php5
was soll jetzt noch verändert werden, bin wirklich ratlos...
Re: PHP5 als Fcgi
okay, in welchem Verzeichnis liegt der php5 Interpreter ?
Re: PHP5 als Fcgi
cd /usr/bin/php5
/usr/bin/php5 # ./php -v
PHP 5.1.2 (cgi) (built: Mar 9 2006 01:17:49)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
/usr/bin/php5 # ./php -v
PHP 5.1.2 (cgi) (built: Mar 9 2006 01:17:49)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
Re: PHP5 als Fcgi
Dann kann das ja nicht gehn.
Re: PHP5 als Fcgi
okay, jetzt mach es doch mal so wie's bei mir ist:
kopiere den php-Interpreter nach
/var/www/vhosts/meinedomain.tld/httpdocs/cgi-bin/php5/php
und pass deine Config an (mit Apache Neustart)
und wenns tut dann verändere es so wie du es brauchst...
(dein ScriptAlias ist voll daneben - les dazu mal die Dokumentation)
kopiere den php-Interpreter nach
/var/www/vhosts/meinedomain.tld/httpdocs/cgi-bin/php5/php
und pass deine Config an (mit Apache Neustart)
Code: Select all
DocumentRoot /var/www/vhosts/meinedomain.tld/httpdocs/
SuexecUserGroup meinftpowner psacln
ScriptAlias /cgi-bin/ /var/www/vhosts/meinedomain.tld/httpdocs/cgi-bin/
Action php5-script "/cgi-bin/php5/php"
AddHandler php5-script .php5(dein ScriptAlias ist voll daneben - les dazu mal die Dokumentation)
Re: PHP5 als Fcgi
So sollte es aussehen:
Code: Select all
gentoo ~ # php-cgi -v
PHP 5.1.2-gentoo with Hardening-Patch 0.4.8 (cgi-fcgi) (built: Apr 4 2006 12:19:12)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Re: PHP5 als Fcgi
Also habe jetzt auch Pfade mit übernomen und erstellt die nicht exestierten.
<Directory "/usr/bin/php5">
Order allow,deny
allow from all
Options ExecCGI
AllowOverride None
</Directory>
ServerName meinedomain.tld
ServerAlias meinedomain.tld
DocumentRoot /var/www/vhosts/meinedomain.tld/httpdocs/
SuexecUserGroup meinftpowner psacln
ScriptAlias /cgi-bin/ /var/www/vhosts/meinedomain.tld/httpdocs/cgi-bin/
Action php5-script "/cgi-bin/php5"
AddHandler php5-script .php5
Kommt Fehler 404
und das erscheint wenn ich apache restart ausführe:
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=meinedomain.tld
h69416:/usr/bin/php5 # /etc/init.d/apache2 restart [Mon Apr 10 15:59:15 2006] [warn] The ScriptAlias directive in /var/www/vhosts/meinedomain.tld/conf/vhost.conf at line 13 will probably never match because it overlaps an earlier ScriptAlias.
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) [Mon Apr 10 15:59:17 2006] [warn] The ScriptAlias directive in /var/www/vhosts/meinedomain.tld/conf/vhost.conf at line 13 will probably never match because it overlaps an earlier ScriptAlias.
Done
suexec.log keine veränderungen
error_log:
das kommt wenn ich so auf die Datei zugreife http://www.meinedomain.tld/cgi-bin/php5/info.php5
[Mon Apr 10 15:58:03 2006] [error] [client xx.xxx.xxx.xx] script not found or unable to stat: /var/www/vhosts/meinedomain.tld/cgi-bin/php5
Und das kommt wenn ich so auf die Datei zugreife http://www.meinedomain.tld/cgi-bin/info.php5
[Mon Apr 10 15:58:08 2006] [error] [client xx.xxx.xxx.xx] File does not exist: /var/www/vhosts/meinedomain.tld/cgi-bin/info.php5
<Directory "/usr/bin/php5">
Order allow,deny
allow from all
Options ExecCGI
AllowOverride None
</Directory>
ServerName meinedomain.tld
ServerAlias meinedomain.tld
DocumentRoot /var/www/vhosts/meinedomain.tld/httpdocs/
SuexecUserGroup meinftpowner psacln
ScriptAlias /cgi-bin/ /var/www/vhosts/meinedomain.tld/httpdocs/cgi-bin/
Action php5-script "/cgi-bin/php5"
AddHandler php5-script .php5
Kommt Fehler 404
und das erscheint wenn ich apache restart ausführe:
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=meinedomain.tld
h69416:/usr/bin/php5 # /etc/init.d/apache2 restart [Mon Apr 10 15:59:15 2006] [warn] The ScriptAlias directive in /var/www/vhosts/meinedomain.tld/conf/vhost.conf at line 13 will probably never match because it overlaps an earlier ScriptAlias.
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) [Mon Apr 10 15:59:17 2006] [warn] The ScriptAlias directive in /var/www/vhosts/meinedomain.tld/conf/vhost.conf at line 13 will probably never match because it overlaps an earlier ScriptAlias.
Done
suexec.log keine veränderungen
error_log:
das kommt wenn ich so auf die Datei zugreife http://www.meinedomain.tld/cgi-bin/php5/info.php5
[Mon Apr 10 15:58:03 2006] [error] [client xx.xxx.xxx.xx] script not found or unable to stat: /var/www/vhosts/meinedomain.tld/cgi-bin/php5
Und das kommt wenn ich so auf die Datei zugreife http://www.meinedomain.tld/cgi-bin/info.php5
[Mon Apr 10 15:58:08 2006] [error] [client xx.xxx.xxx.xx] File does not exist: /var/www/vhosts/meinedomain.tld/cgi-bin/info.php5
Last edited by test022 on 2006-04-10 18:45, edited 1 time in total.
Re: PHP5 als Fcgi
hmm, also ich bin ja gerne Bereit zu helfen - aber ein wenig Eigeninitiative wäre auch nett...
z.B. solltest du jetzt erstmal den Fehler beim Apache restart beheben...
und zudem hast du's wieder nicht so gemacht wie ich gesagt habe - dein Action sieht anders aus
z.B. solltest du jetzt erstmal den Fehler beim Apache restart beheben...
und zudem hast du's wieder nicht so gemacht wie ich gesagt habe - dein Action sieht anders aus
Re: PHP5 als Fcgi
Und solange sein PHP nicht als FCGI kompiliert ist, wird es eh nicht wie gewünscht funktionieren...
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
