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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-28-2004, 09:05 AM
|
#1
|
Member
Registered: Nov 2004
Posts: 34
Rep:
|
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.
|
|
|
12-30-2004, 06:46 PM
|
#2
|
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:
|
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
|
|
|
12-30-2004, 07:47 PM
|
#3
|
Member
Registered: Nov 2004
Posts: 34
Original Poster
Rep:
|
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
|
|
|
12-30-2004, 07:51 PM
|
#4
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
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.
|
|
|
12-30-2004, 07:51 PM
|
#5
|
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:
|
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
|
|
|
12-30-2004, 07:59 PM
|
#6
|
Member
Registered: Nov 2004
Posts: 34
Original Poster
Rep:
|
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
|
|
|
12-30-2004, 08:04 PM
|
#7
|
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:
|
|
|
|
All times are GMT -5. The time now is 01:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|