LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-20-2004, 09:07 AM   #1
aadaileh
LQ Newbie
 
Registered: Jan 2004
Location: Germany
Posts: 9

Rep: Reputation: 0
Installing two versions of php in the same machine.


Hi there ...

We need to get two different applications running in the same server.
The problem that each application needs different version of php; applicationX runs with any php version under 4.3 and the applicationY runs with php version 4.3 and above.

My question is: How can I get the two applications running in the same machine without having two Apache servers installed in the system?

Thanks for help,

Ahmed
 
Old 04-20-2004, 09:34 AM   #2
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
Can't you change the file extension and associate the different extensions with other modules?
 
Old 04-20-2004, 09:34 AM   #3
iluvatar
Member
 
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403

Rep: Reputation: 30
never tried it but this should be something:

*install the php versions in different directories
*mess-up the php config files (maybe, not sure...)
*bind different filename extensions to the different php modules in the apache mime config file, like .php3 and .php4 for the different apps... technically it's possible to bind every extension to the php interpreter (even .asp)
*be sure the two apps use the correct file names so they use the correct php version

but isn't php 4.3 and newer compatible with the older versions?
note: maybe the php module won't load if there's another version already loaded, I don't know that...

greetz,
.-=~ iluvatar ~=-.

Last edited by iluvatar; 04-20-2004 at 09:38 AM.
 
Old 04-20-2004, 10:18 AM   #4
aadaileh
LQ Newbie
 
Registered: Jan 2004
Location: Germany
Posts: 9

Original Poster
Rep: Reputation: 0
jcookeman & iluvatar ...

Thanx a lot for your fast response )

Actually; what you've suggested was the first idea I discussed with our webmaster ... The problem was the huge amount of work needed to change the file extension in one of the two application from (*.php) to (*.php4) to assign it to special modle. Having in mind that we will need not only to rename scripts but also to open every script inside the application and rename every included script name ...

In case of having no any other solution we may stick to this one. But I would appreciate having a solution, which assign every application to a certain php version based on the location of this application inside the DocRoot; for example:

[ApplicationX]: /www/htdocs/applicationx
[ApplicationY]: /www/htdocs/applicationy

So, isn't possible to configure two different virtual servers where everyone is pointing to different directory in the docroot and -of course- where it assigns certain php version to all php scripts stand in this certain directory?

Hope to hear from you soon ...

Ahmed
 
Old 04-20-2004, 10:23 AM   #5
iluvatar
Member
 
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403

Rep: Reputation: 30
the renaming can be done with one simple script I saw it on this forum somewhere... I would try this setup, the renaming isn't that hard. All links inside the code can even be renamed with ONE command look at the 'sed' command man-page for how to do that, renaming the files themselves has to be done with a small script, but can't remember

greetz,
.-=~ iluvatar ~=-.

Last edited by iluvatar; 04-20-2004 at 10:24 AM.
 
  


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
sles 9 and apache/php versions scabrous1 SUSE / openSUSE 1 11-16-2005 09:30 AM
ES 4 Apache and PHP versions? bgriffin21 Red Hat 1 04-09-2005 10:51 AM
2 versions of php? biglaz Linux - Software 3 10-17-2004 01:48 PM
Unable boot multiple kernel versions off of Redhat machine liangjz Linux - Newbie 3 03-16-2004 10:01 AM
Do multiple versions of Apache on one machine affect each other? mlhammer Linux - Software 0 11-28-2003 06:33 PM

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

All times are GMT -5. The time now is 08:28 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