LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 12-28-2004, 10:05 AM   #1
cubax
Member
 
Registered: Nov 2004
Posts: 34

Rep: Reputation: 15
Multiple instances of PHP


Hello Everybody,
I just moved from win where I'm a php programmer.
I'm now running on suse 9.2.
What I need is to have multiple instances of php installed because I have different customers using different version of PHP.
Suse automatically installs the latest version (4.3.x) and I already downloaded the other version I need (4.2.1)
Does anybody have an idea on how to do it?

Thanks.
 
Old 12-30-2004, 07:46 PM   #2
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
download the old version, uninstall the old one using (i think) yast

then rpm the one you want using

rpm -hiv php-x.x.x.rpm
 
Old 12-30-2004, 08:47 PM   #3
cubax
Member
 
Registered: Nov 2004
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks for your answer Adam but I think I've not been clear...
I need to have both versions installed and to have a way to switch between one or the other.
In other words:
Today i want to run with php 4.2.1 tomorrow I want to use 4.3.1.

with WIN I was able to do it having both binaries installed and with a batch file I set the system to use one or the other. I don't know how to do it with LIN.

Thanks.

Ciao
 
Old 12-30-2004, 08:51 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,164

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
There are two choices that I can think of:

(1) Install PHP as a CGI binary (there are directions on the PHP Web site) and set up two virtual hosts in Apache, one for each PHP version.

(2) Install Apache + PHP twice (for the two different version, from source) and have the second Apache listen on a different port, like 8080.

There may be easier ways to do this, but this is what popped into my head right away.
 
Old 12-30-2004, 08:51 PM   #5
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
ahh, i c

ok, what you will need to do is probably change your apache config file to associate itself with different php versions, and compile one version somewhere else from where the other one is

because i have little experience with php, i cant help you with doing this, but i think the easier way is to have 2 seperate instances of apache with a common htdocs folder, then just close one version of apache and start the other one

now, again, i mention i have little experience with php, therefore i cannot help you much past this, but this is the easiest way i think to do it

so have 2 instances of apache compiled with 1 version of php associated with each of them, then stop one apache and restart the other

--adam
 
Old 12-30-2004, 08:59 PM   #6
cubax
Member
 
Registered: Nov 2004
Posts: 34

Original Poster
Rep: Reputation: 15
uhm.... Your inputs are quite similar. I think I'll try the way to have both apache and PHP installed twice having them configured "in couples".
The question now is (please don't blame me... I'm a good PHP programmer but a LIN newbie) how di I install apache and php without using YAST?
Because now it has to be done manually (of course).

Thank you very much.
Ciao
 
Old 12-30-2004, 09:04 PM   #7
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
http://www10.brinkster.com/ssruprai/comphp.asp
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Multiple instances of artsd Mojojo Linux - Software 0 10-13-2005 12:41 PM
SAMBA: Multiple Instances? Matir Linux - Software 0 02-18-2005 11:43 AM
multiple instances of PHP installation cubax Linux - General 1 12-29-2004 08:03 PM
Mplayer and Multiple instances Spaz007 Linux - Software 0 09-16-2004 11:59 PM
Multiple instances of same user justinv Linux - General 7 01-19-2003 05:05 PM


All times are GMT -5. The time now is 05:12 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration