We are performing an upgrade to the forum tonight (EST) and some downtime is expected. You can join our Discord server or follow our Twitter account for the latest updates.
Different php versions same apache server — LowEndTalk
Hi there
I have php 5.4 on my server , but I have a script which is a bit old and can't run on 5.4..
Is there any way to run 5.3 or 5.2 on the same server , without messing up my other sites, running ok on 5.4 ?
@vladinc - Pretty simple: Run PHP using FasCGI and write a fcgi wrapper and use it to lauch what ever PHP version you have. The basic idea is pretty simple.
[Edit]
I'd post an example however I've switched to Nginx a while back and never looked back.
Why can't you just update the script to work with 5.4? Changes from 5.2 and 5.3, which is what you're asking for, aren't incredibly major where you can't just go in and alter your script.
u can have multiple php version under 1 apache server
not sure how exactly but can be done by mime type or something similar
Eg. .php4 to run php 4.x .php to run php 5.x
Comments
@vladinc - Pretty simple: Run PHP using FasCGI and write a fcgi wrapper and use it to lauch what ever PHP version you have. The basic idea is pretty simple.
[Edit]
I'd post an example however I've switched to Nginx a while back and never looked back.
Not sure how to do it..
Could you point me to some examples..
I am running CentOS 5.9 with Apache 2
Try this tutorial? Just replace PHP4 with PHP 5.3 or 5.2.
http://gggeek.altervista.org/2007/07/21/running-multiple-php-versions-on-a-single-apache-install/
Thank you..
I will give it a try
Why can't you just update the script to work with 5.4? Changes from 5.2 and 5.3, which is what you're asking for, aren't incredibly major where you can't just go in and alter your script.
I could go and go and go for a looooong time
u can have multiple php version under 1 apache server
not sure how exactly but can be done by mime type or something similar
Eg. .php4 to run php 4.x .php to run php 5.x