coexistence of php4 and php5 on ISPC3

Discussion in 'Tips/Tricks/Mods' started by AceLine, Oct 28, 2010.

  1. AceLine

    AceLine New Member

    Hi Falco, hi Till, hello everyone!

    Thnx for your great work at first! I bought a membership last week to download the new manual of ISPC3 and I love it... Very usefull.

    There is only one point I´m not able to solve since some time. I already was searching the web by google, searching the howtoforge.com-forums, tried everything (that I know) to find usefull information about: Peacefull coexistence of php4 and php5 in ISPConfig 3

    I found some information getting deep into changing default ISPC3-configuration. I´m sure I found enough information to get it to work but I could not find any help, how-to, tutorial on how to realize this coexistence in a perfect running ISPC3-configuration without meshing up default configuration, overwritten any time I go for an version update or upgrade.
    In the new manual only one line gave me hope to solve this need: "More than one PHP version can be run as FastCGI".
    That sounds like it´s not a big thing... My problem is the need of php4 for some older projects to run but I don´t want to experiment around on a production machine.

    Could you give me - and others - possibly a secure step-by-step how-to or tutorial on:

    "HOW TO IMPLEMENT PHP4 ON A ISPC3 SERVER TO PEACEFULLY COEXIST WITH PHP5"

    If this is asked to much, maybe you just could give me some easy to understand advice to find my way. My main focus is on compatibility with updates of future releases without meshing up the configuration.



    Thnx in advace for your help


    Best regards from Vienna -

    Ingmar

    -----------------------------------
    Debian Lenny - ISPConfig 3.3
     
  2. falko

    falko Super Moderator ISPConfig Developer

  3. wiss

    wiss New Member

    I follow both first tutorial and not working for me:

    This is my vhost.conf:

    Code:
    <Directory /var/www/cblasan.com>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
    
    <VirtualHost *:80>
          DocumentRoot /var/www/clients/client1/web1/web
      
        ServerName cblasan.com
        ServerAlias *.cblasan.com
        ServerAdmin [email protected]
    
        ErrorLog /var/log/ispconfig/httpd/cblasan.com/error.log
    
    	
        <Directory /var/www/cblasan.com/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
        <Directory /var/www/clients/client1/web1/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    
    
        # Clear PHP settings of this website
        <FilesMatch "\.ph(p3?|tml)$">
            SetHandler None
        </FilesMatch>
        # php as cgi enabled
        ScriptAlias /php5-cgi /var/www/php-cgi-scripts/web1/php-cgi-starter
        Action php5-cgi /php5-cgi
        AddHandler php5-cgi .php .php3 .php4 .php5
        <Directory /var/www/php-cgi-scripts/web1/>
            Order allow,deny
            Allow from all
        </Directory>
    
        # add support for apache mpm_itk
        <IfModule mpm_itk_module>
          AssignUserId web1 client1
        </IfModule>
    
        <IfModule mod_dav_fs.c>
          # DO NOT REMOVE THE COMMENTS!
          # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
          # WEBDAV BEGIN
          # WEBDAV END
        </IfModule>
    AddHandler php-script .php4
    Action php-script /cgi-bin/php4
    DirectoryIndex index.html index.htm index.shtml index.cgi index.pl index.php index.php4 index.xhtml
    </VirtualHost>
    
    
    
    and ispconfig is:

    [​IMG]

    result:
    [​IMG]

    Thank you in advance
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Please remove the .php4 extension from the following line:
    Code:
    AddHandler php5-cgi .php .php3 .php4 .php5
     
  5. wiss

    wiss New Member

    Hy Falko, this is my vhost.conf now:

    Code:
    <Directory /var/www/cblasan.com>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
    
    <VirtualHost *:80>
          DocumentRoot /var/www/cblasan.com/web
      
        ServerName cblasan.com
        ServerAlias *.cblasan.com
        ServerAdmin [email protected]
    
        ErrorLog /var/log/ispconfig/httpd/cblasan.com/error.log
    
    	
        <Directory /var/www/cblasan.com/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
        <Directory /var/www/clients/client1/web1/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    
    
        # suexec enabled
        SuexecUserGroup web1 client1
        # Clear PHP settings of this website
        <FilesMatch "\.ph(p3?|tml)$">
            SetHandler None
        </FilesMatch>
        # php as fast-cgi enabled
        <IfModule mod_fcgid.c>
          # SocketPath /tmp/fcgid_sock/
          IdleTimeout 3600
          ProcessLifeTime 7200
          # MaxProcessCount 1000
          DefaultMinClassProcessCount 3
          DefaultMaxClassProcessCount 100
          IPCConnectTimeout 8
          IPCCommTimeout 360
          BusyTimeout 300
        </IfModule>
        <Directory /var/www/cblasan.com/web>
            AddHandler fcgid-script .php .php3 .php5
            FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
            Options +ExecCGI
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    	<Directory /var/www/clients/client1/web1/web>
            AddHandler fcgid-script .php .php3 .php5
            FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
            Options +ExecCGI
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    
        # add support for apache mpm_itk
        <IfModule mpm_itk_module>
          AssignUserId web1 client1
        </IfModule>
    
        <IfModule mod_dav_fs.c>
          # DO NOT REMOVE THE COMMENTS!
          # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
          # WEBDAV BEGIN
          # WEBDAV END
        </IfModule>
    AddHandler php-script .php4
    Action php-script /cgi-bin/php4
    DirectoryIndex index.html index.htm index.shtml index.cgi index.pl index.php index.php4 index.xhtml
    
    </VirtualHost>
    
    
    
    PHP

    [​IMG]

    Uploaded with ImageShack.us


    [​IMG]


    I don't know i do wrong...

    error.log vhost:

    Code:
    cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:17 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imagick.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:17 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imap.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:17 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:17 2010] [error] [client 82.158.76.244] PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:17 2010] [error] [client 82.158.76.244] PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imagick.ini on line 1 in Unknown on line 0
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imap.ini on line 1 in Unknown on line 0
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imagick.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imap.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imagick.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imap.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imagick.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imap.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:18 2010] [error] [client 82.158.76.244] PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0, referer: http://www.cblasan.com/info.php
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imagick.ini on line 1 in Unknown on line 0
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imap.ini on line 1 in Unknown on line 0
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imagick.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imagick.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imagick.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imap.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imap.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/imap.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0, referer: http://www.cblasan.com/info.php4
    [Thu Nov 04 18:08:22 2010] [error] [client 82.158.76.244] PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0, referer: http://www.cblasan.com/info.php4
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Does /usr/lib/cgi-bin/php4 exist?
     

Share This Page