Running PHP 5.2 and 5.3 on same apache server instance

Hi folks,

I have a legacy app that only runs on PHP 5.2. I have other apps on PHP 5.3.

I use same apache instance with virtual hosting to run multiple sites including the one running legacy app with PHP 5.2.

Has anyone done this with their Linode server ?

I'd appreciate any help on links/docs or pointers on how to do this.

Regards

J.

2 Replies

Run one as an apache module and one as fast cgi and you'll be fine, you can even do this on a virtual host basis by assigning the file handlers in the virtual host.

However I've no idea if you can find packages for both version of php that will install along side each other, I imagine in most distros they will overwrite each other. You may have to compile yourself.

Another way to avoid compiling things yourself (I tend to try to avoid that at all costs as it makes keeping the system up to date a lot harder) is to run a separate system in a chroot jail:

https://help.ubuntu.com/community/BasicChroot

It's very easy to set up, and you can update both outside and inside the chroot jail just by using (twice, obviously) apt-get or aptitude. The downside is that it's kind of overkill, and you'll need a second IP to do it. The upside is that you can have different packages installed inside the chroot jail.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct