[development] PHP version stats

Jonathan Lambert j at firebright.com
Mon Mar 26 17:43:51 UTC 2007



On Mar 26, 2007, at 8:21 AM, Earnie Boyd wrote:

> Quoting John Ackers <john.ackers at mail.com>:
>
>> I have discussed PHP5 support with my hosting company and they are  
>> not
>> interested (because existing PHP4 code does not execute the same  
>> under
>> PHP5).
>> <snip>
>
> It sounds to me that PHP5 needs patched to execute PHP4 on  
> command.  Then you can control which PHP API version to follow from  
> within the code.  NOT.
>
It won't work quite like that...

> <snip>

> Would it not be possible to execute a second instance of apache  
> giving a configuration file other than the default one that pointed  
> its virtual services to php5?  I think I'll go try this now.

There are basically three ways to do this:

Compile and install cgi versions of php, and change the configs /  
paths to them in your apache instance to point to the version you  
want active.  This will make it possible to run them both on the same  
box but not at the same time. Or...

You can patch the system and run them in parallel.  This requires  
file extensions, and I wouldn't want to have to maintain it. Just  
*seems* brittle.  Here is the patch: http://www.webhostingtalk.com/ 
showthread.php?t=485646

Run them on two instances.  You can actually run php4 and php5 in  
parallel at the same time.  Just proxy your second instance through  
the second server, and put a request handler (mod_rewrite) for  
something like .php5.  You'll have to rename your files for that to  
work as well.  This setup is easier to maintain, but a pain to set up.

More info:
http://www.sitepoint.com/blogs/2004/03/24/running-php4-and-php5-in- 
parallel/
http://lists.freebsd.org/pipermail/freebsd-questions/2005-October/ 
100384.html
--
Jonathan Lambert
Principal | FireBright, Inc.
Email: j at firebright.com

--------------------------------------------------
"A witty saying proves nothing."
- Voltaire (1694-1778)



More information about the development mailing list