-ryou-
Goto Top

IspCP und phpfarm - Mehrere PHP-Versionen mit mod fcgid.c

Hallo zusammen,

ich hänge leider gerade an einem Problem mit mehreren PHP Versionen fest. Ich habe zum einen PHP 5.3.3 und bräuchte zusätzlich noch 5.2.11 für gewisse virtuelle hosts.

Hab ein Debian Squeeze laufen und die ispCP Version 1.0.7

Ich habe folgendes gemacht:

# cd var && git clone git://git.code.sf.net/p/phpfarm/code phpfarm
# cd phpfarm/src && ./compile.sh 5.2.11

alles gut soweit. Dann folgende Anpassungen in Files....

/var/www/fcgi/mydomain.de/php5-fcgi-starter
#!/bin/sh

umask 022

PHPRC="/var/www/fcgi/mydomain.de/php5/"  
export PHPRC

TMPDIR="/var/www/virtual/mydomain.de/phptmp"   
export TMPDIR

PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN

exec /var/phpfarm/inst/php-5.2.11/bin/php-cgi

/etc/apache2/ispcp/mydomain.de.conf:
<IfModule mod_fcgi.c>
        FcgidWrapper On
        FcgidIpcDir /var/lib/apache2/fcgid/sock

 	FcgidWrapper /var/www/fcgi/mydomain.de/php5-fcgi-starter .php

#
        # PHP5 SUPPORT
        #

        AddHandler fcgid-script .php .php5

        <Location /php5/php5-fcgi-starter>
                SetHandler fastcgi-script
                Options +ExecCGI
        </Location>

        Action php-fastcgi /php5/php5-fcgi-starter
        AddType application/x-httpd-php .php .php5
</IfModule>

after that reload apache - all good
Wenn ich jetzt auf mydomain.de gehe bekomme ich Error 500

[Tue Jan 24 13:26:34 2012] [warn] [client 188.174.59.60] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Tue Jan 24 13:26:34 2012] [error] [client 188.174.59.60] Premature end of script headers: index.php

Wo liegt mein Fehler? Ich komm nicht drauf.
Bin dankbar für jede Hilfestellung

Gruß
Steven

Content-Key: 179471

Url: https://administrator.de/contentid/179471

Printed on: April 25, 2024 at 03:04 o'clock

Member: StefanKittel
StefanKittel Jan 24, 2012 at 16:42:24 (UTC)
Goto Top
Hallo,

schau mal hier
http://www.soeren-hentzschel.at/technik/linux-server/2011/03/29/php-5-2 ...

Ist allerdings für ispconfig, funktioniert mit meinem froxlor aber auch.
Wie ist der Stand bei ispcp. War doch schon tot oder?

Stefan
Member: -Ryou-
-Ryou- Jan 24, 2012 at 18:11:20 (UTC)
Goto Top
danke schon nicht schlecht. ispCP lebt!!!!
Hab den Error 500 jetzt losgebracht daür jetzt einen Error 403 Forbidden!

hab das in der ispcp.onf für die virtuellen hosts geändert
<VirtualHost xx.xxx.xxx.xxx:80>

    <IfModule suexec_module>
           SuexecUserGroup vu2017 vu2017
<FilesMatch \.php$>
    SetHandler fcgid-script
</FilesMatch>

AddHandler fcgid-script .php .php4 .php5
FCGIWrapper "/var/www/fcgi/mydomain.de/php5-fcgi-starter" .php  
FCGIWrapper "/var/www/fcgi/mydomain.de/php5-fcgi-starter" .php5  
FCGIWrapper "/var/www/fcgi/mydomain.de/php5-fcgi-starter" .php4  
    </IfModule>

    ServerAdmin     webmaster@mydomain.de
    DocumentRoot    /var/www/virtual/mydomain.de/htdocs

    ServerName      mydomain.de
    ServerAlias     www.mydomain.de mydomain.de vu2017.admin.s15800746.onlinehome-server.info

    Alias /errors   /var/www/virtual/mydomain.de/errors/

    RedirectMatch permanent ^/ftp[\/]?$         http://admin.s15800746.onlinehome-server.info/ftp/
    RedirectMatch permanent ^/pma[\/]?$         http://admin.s15800746.onlinehome-server.info/pma/
    RedirectMatch permanent ^/webmail[\/]?$     http://admin.s15800746.onlinehome-server.info/webmail/
    RedirectMatch permanent ^/ispcp[\/]?$       http://admin.s15800746.onlinehome-server.info/

    ErrorDocument 401 /errors/401.html
    ErrorDocument 403 /errors/403.html
    ErrorDocument 404 /errors/404.html
    ErrorDocument 500 /errors/500.html
    ErrorDocument 503 /errors/503.html

    <IfModule mod_cband.c>
        CBandUser mydomain.de
    </IfModule>

    # httpd awstats support BEGIN.

   # httpd awstats support END.

    # httpd dmn entry cgi support BEGIN.
    ScriptAlias /cgi-bin/ /var/www/virtual/mydomain.de/cgi-bin/
     <Directory /var/www/virtual/mydomain.de/cgi-bin>
        AllowOverride AuthConfig
        #Options ExecCGI
        Order allow,deny
        Allow from all
    </Directory>
    # httpd dmn entry cgi support END.

    <Directory /var/www/virtual/mydomain.de/htdocs>
        # httpd dmn entry PHP support BEGIN.
        # httpd dmn entry PHP support END.
        Options -Indexes Includes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    # httpd dmn entry PHP2 support BEGIN.
    <IfModule mod_php5.c>
    </IfModule>
    #<IfModule mod_fastcgi.c>
    #    ScriptAlias /php5/ /var/www/fcgi/mydomain.de/
    #    <Directory "/var/www/fcgi/mydomain.de"> 
    #        AllowOverride None
    #        Options +ExecCGI -MultiViews -Indexes
    #        Order allow,deny
    #        Allow from all
    #    </Directory>
    #</IfModule>
<IfModule mod_fcgi.c>
        FcgidWrapper On
        FcgidIpcDir /var/lib/apache2/fcgid/sock/

                FCGIWrapper "/var/www/fcgi/mydomain.de/php5-fcgi-starter" .php  

#
        # PHP5 SUPPORT
        #

        AddHandler fcgid-script .php .php5

        <Location /php5/php5-fcgi-starter>
                SetHandler fastcgi-script
                Options +ExecCGI
        </Location>

        Action php-fastcgi /php5/php5-fcgi-starter
        AddType application/x-httpd-php .php .php5
</IfModule>   


# httpd dmn entry PHP2 support END.

    Include /etc/apache2/ispcp/mydomain.de.conf

Apache Log spuckt nichts mehr aus. Und testweise habe ich die permissions auf 777 gesetzt, bringt auch nix.
Vll. ne Idee?

Gruss Steven
Member: -Ryou-
-Ryou- Jan 25, 2012 at 13:41:19 (UTC)
Goto Top
ok hab glaub noch ein anderes Problem
/usr/bin/php5-cgi --versionPHP 5.3.3-7+squeeze3 with Suhosin-Patch (cgi-fcgi) (built: Jun 28 2011 08:20:54)Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v4.0.12, Copyright (c) 2002-2011, by ionCube Ltd.
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
/usr/bin/php52/php-cgi --versionPHP 5.2.11 (cgi) (built: Jan 25 2012 00:09:11)Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

es müsste doch versionPHP 5.2.11 (cgi-fcgi)
heißen oder?

ich hab wie folgt installiert:
./configure --prefix=/usr/share/php52 --datadir=/usr/share/php52 --mandir=/usr/share/man --bindir=/usr/bin/php52 --with-libdir=lib64 --includedir=/usr/include --sysconfdir=/etc/php52/apache2 --with-config-file-path=/etc/php52/apache2 --with-config-file-scan-dir=/etc/php52/conf.d --enable-fastcgi

make
make install

Was übersehe ich?