View Full Version : coexistence of php4 and php5 on ISPC3
AceLine
28th October 2010, 14:36
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
falko
29th October 2010, 14:15
Take a look here:
http://www.howtoforge.com/apache2_with_php5_and_php4
http://www.howtoforge.com/apache2_suphp_php4_php5_p3
if you use the first example, you can enable PHP5 as mod_php or FastCGI from within ISPConfig, and then you add directives for PHP4 in the Apache Directives field in ISPConfig.
wiss
3rd November 2010, 11:15
I follow both first tutorial and not working for me:
This is my vhost.conf:
<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 webmaster@cblasan.com
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:
http://img801.imageshack.us/img801/7047/seleccin002a.png
result:
http://img266.imageshack.us/img266/9655/seleccin003.png
Thank you in advance
falko
4th November 2010, 17:53
Please remove the .php4 extension from the following line:
AddHandler php5-cgi .php .php3 .php4 .php5
wiss
4th November 2010, 18:13
Hy Falko, this is my vhost.conf now:
<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 webmaster@cblasan.com
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
http://img577.imageshack.us/img577/4821/seleccin005.png (http://img577.imageshack.us/i/seleccin005.png/)
Uploaded with ImageShack.us (http://imageshack.us)
http://img59.imageshack.us/img59/3532/seleccin004.png (http://img59.imageshack.us/i/seleccin004.png/)
I don't know i do wrong...
error.log vhost:
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
falko
5th November 2010, 14:56
Does /usr/lib/cgi-bin/php4 exist?
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.