#1  
Old 2nd May 2007, 17:41
findafriend findafriend is offline
Member
 
Join Date: Apr 2007
Posts: 49
Thanks: 10
Thanked 3 Times in 3 Posts
Default php4 and php5 at same time

Hi

I have had a look where Till suggested that you run php4 as a cgi object.

I have postnuke 0.7.63 installed on a webserver and want to transfer it to a new server with ispconfig.

It is just not possible to run php4 as php5 is installed as default.

Is the only solution to run php4 as described in a thread here today ?

Why not make ispconfig configured, so you can tick php4 or php5 off in the controlpanel for the specific domain, then it would really help you solve a lot problems.

Sincerely

Mogens
Reply With Quote
The Following User Says Thank You to findafriend For This Useful Post:
Williamsl (23rd July 2014)
Sponsored Links
  #2  
Old 2nd May 2007, 20:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

Quote:
It is just not possible to run php4 as php5 is installed as default.
This is assumption not correct. I recently installed it for a customer: php as mod_php + php4 as cgi.

1) Install the php4-cgi package from your linux distribution.

2) To enable PHP4 in a website, add these two lines in the
apache directives field of the website:

Action php4-cgi /cgi-bin/php
AddHandler php4-cgi .php


And then make sure that the following options are disabled:

CGI-Scripts
Standard CGIs
PHP Scripts
PHP Safemode
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
findafriend (2nd May 2007)
  #3  
Old 2nd May 2007, 21:05
findafriend findafriend is offline
Member
 
Join Date: Apr 2007
Posts: 49
Thanks: 10
Thanked 3 Times in 3 Posts
Default

Hi Till

Thanks again for your great help.
You have just helped me installing ispconfig on domain : easywebhost.dk
How do i install the modules without smash my ispconfig installation ?
Is it enought to use the normal debian commands :

apt-get php4-cgi install

Sincerely

Mogens
Reply With Quote
  #4  
Old 3rd May 2007, 09:19
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

Quote:
Is it enought to use the normal debian commands :

apt-get php4-cgi install
Yes, this should work.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 21st June 2007, 21:35
melwood melwood is offline
Member
 
Join Date: Jun 2007
Location: Edling, Germany
Posts: 37
Thanks: 5
Thanked 1 Time in 1 Post
Default

Hi,

I have a debiab etch server installed after the "perfect setup"-HowTo.
I Installed php4-cgi with apt-get intall php4-cgi

Added the following to the apache directives field of the website

Action php4-cgi /cgi-bin/php
AddHandler php4-cgi .php

And disabled the follwing options within the specific web:

CGI-Scripts
Standard CGIs
PHP Scripts
PHP Safemode

Now all I see is the php source code. Did I miss something?

melwood
Reply With Quote
  #6  
Old 21st June 2007, 23:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

This will only work depends if you have a binary named php in your global cgi-bin directory.

For example the php4 binary might be named php4 or php4-cgi and not php, so the rsulting code will be:

Action php4-cgi /cgi-bin/php4
AddHandler php4-cgi .php

or:

Action php4-cgi /cgi-bin/php4-cgi
AddHandler php4-cgi .php
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 22nd June 2007, 15:11
melwood melwood is offline
Member
 
Join Date: Jun 2007
Location: Edling, Germany
Posts: 37
Thanks: 5
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till
This will only work depends if you have a binary named php in your global cgi-bin directory.

For example the php4 binary might be named php4 or php4-cgi and not php, so the rsulting code will be:

Action php4-cgi /cgi-bin/php4
AddHandler php4-cgi .php

or:

Action php4-cgi /cgi-bin/php4-cgi
AddHandler php4-cgi .php
Okay, there is a /usr/lib/cgi-bin/php4 on my system, so I added

Action php4-cgi /usr/lib/cgi-bin/php4
AddHandler php4-cgi .php

But now I get a 404: Fehler 404 - Datei nicht gefunden!

Also tried

Action php4-cgi /cgi-bin/php4

as I'm not sure if I have to use the full path there, but the same result...

There is also a /usr/bin/php4-cgi but this isn't working either.

HTML-files are shown correctly...

The error log says: [Fri Jun 22 15:48:13 2007] [error] [client 74.6.28.226] File does not exist: /var/www/web17/web/cgi-bin



melwood

Last edited by melwood; 22nd June 2007 at 15:57.
Reply With Quote
  #8  
Old 22nd June 2007, 16:44
melwood melwood is offline
Member
 
Join Date: Jun 2007
Location: Edling, Germany
Posts: 37
Thanks: 5
Thanked 1 Time in 1 Post
 
Default

Okay, had to set

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

in apache2.conf

now it works. Thanks for the help
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php5 and php4 at the same time Hans Installation/Configuration 15 22nd October 2008 13:02
VHosts + basedir + PHP4 and PHP5 at same time Sid HOWTO-Related Questions 5 14th December 2006 18:20
suse 10.1 php5 to php4 Boon-Dog-Danny Installation/Configuration 2 6th August 2006 15:09
Running Apache2 With PHP5 And PHP4 At The Same Time hansmi HOWTO-Related Questions 3 28th June 2006 09:49
PHP4 and PHP5 for SUSE 9.3 Prof M.Behrens Installation/Configuration 3 2nd April 2006 22:20


All times are GMT +2. The time now is 07:54.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.