LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-04-2008, 07:50 AM   #1
MaL3aS
LQ Newbie
 
Registered: Nov 2007
Posts: 4

Rep: Reputation: 0
Apache - PHP4 + PHP5


I am sorry for the title but I have no other way to describe the problem.#
I have a server (fedora 6) running cPanel+WHM. I have installed both PHP4 and PHP5.
The problem is that I have a site that most probably needs only PHP4 to run.
How do I configure the virtual host or the ".htaccess" file to achieve this. The site is PHP+MySQL and the name of the script is "LastMinute".

Thanks a ton in advance for any help.

Chris
 
Old 03-05-2008, 02:02 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If you want to run both php4 and php5 in apache, you must install one of them to run as a module (the default) and the other to run as a cgi. Read this howto to see how this can be done. It's written for Debian and Ubuntu but the configuration steps are quite the same.
You can then put in the <VirtualHost>...</VirtualHost> part of the site in question the following (assuming that you installed php4 as a cgi):
Code:
ScriptAlias /php-cgi /usr/lib/php4/bin/php-cgi
AddHandler php-script .php4 .php-cgi
Action php-script /cgi-bin/php4
 
Old 03-05-2008, 05:03 PM   #3
MaL3aS
LQ Newbie
 
Registered: Nov 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you bathory I will try it
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache/PHP4 and Apache2/PHP5 in the same Ubuntu box oozypal Linux - Server 3 12-08-2007 01:47 PM
switch between php4 and php5 cooljai Linux - Software 1 06-11-2007 07:15 AM
Apache running with PHP4 & PHP5 possible? mastrboy Linux - Software 1 01-18-2006 09:35 PM
Php5 >> Php4 Eric45008 Slackware 22 04-25-2005 07:37 PM
installing PHP4 and PHP5 on apache jerry_redhat Linux - Software 2 07-08-2003 10:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration