|
|

06-19-2006, 09:32 AM
|
|
New Member
|
|
Join Date: Jun 2006
Posts: 6
|
|
Running PHP 4 and 5 in parallel
Hi there,
this is my first post here. I am having another look at litespeed and really like what I am seeing so far. Now to my question.
I am wondering how to run both PHP 4 and 5 on the same server. I have about 30 vhosts on this one machine (still running apache) of which I want to run most sites on PHP 5. But there are a couple of older sites which I have no time to port to PHP 5. Running PHP 4 and 5 on the same Apache instance is a real pain and so I am wondering on how to do it with lsws since I really want to migrate all my PHP development to version 5.1.x.
Any hints?
|

06-19-2006, 11:07 AM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
|
|
|
With litespeed you can easily mix and max different version of existing backend technologies:
1) Define both "PHP4" and "PHP5" instances in "External Applications".
2) Use script handlers to give "PHP4" to scripts named php or php4 and "PHP5" workers to scripts named php5.
Last edited by xing; 06-19-2006 at 11:17 AM..
|

06-19-2006, 11:53 AM
|
|
Senior Member
|
|
Join Date: Nov 2004
Posts: 288
|
|
I'm actually running both php-versions because of the same very reason, legacy applications .
Go with 1), define both php-installs as handlers in external applications (the big difference to apache is that they run as fastcgi, not module)
and override the global script handlers for each vhost the way you want, so you can use .php for php4 in one host, .php for php5 in another host.
|

06-19-2006, 01:33 PM
|
|
New Member
|
|
Join Date: Jun 2006
Posts: 6
|
|
Good to know. Now I have no excuse to not actually try it out 
I knew that you could do that with FastCGI. You can use any webserver that supports FastCGI to do this. I guess I should have asked if the lsapi supports this. I tried to lear more about it, but could only find a dead link to
http://www.litespeedtech.com/lsapi/
So, can lsapi do it or do I have to use FastCGI for this?
__________________
-Sasa
|

06-19-2006, 01:40 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
Yes, you can use lsapi, it works in the similar way as FastCGI, just faster due to the optimization in protocol.
|

06-19-2006, 02:50 PM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
|
|
|
Sasa,
Thanks for pointing out the the faulty url. /lsapi/ is an old link from our previous web site but we overlooked it when creating important redirects to smooth the transition. Problem fixed. /lsapi/ will now be redirected to the correct page.
|

10-11-2006, 04:03 AM
|
|
New Member
|
|
Join Date: Oct 2006
Posts: 3
|
|
Quote:
Originally Posted by mistwang
Yes, you can use lsapi, it works in the similar way as FastCGI, just faster due to the optimization in protocol.
|
So both PHP 4 and PHP 5 could be run in parallel using lsapi?
Additionally, you said that lsapi functions similar to fastcgi, but faster, so does that mean it's performance is comparable to that of apache's mod_php, or is it faster? (I ask, because I know that FastCGI PHP doesn't seem to be *quite* as fast as mod_php, under apache)
|

10-11-2006, 10:14 AM
|
|
LiteSpeed Staff
|
|
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
|
|
|
LSAPI PHP is much more scalable than mod_php not because it can excecute script faster but because it is much more resource efficient. Instead of having every single Apache process bind with mod_php even for requests that do not need it, LSAPI PHP creates a worker pool of php processes and thrink and expand as demand.
|

10-11-2006, 10:22 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
And both FCGI PHP and LSAPI PHP with LiteSpeed is faster than Apache's mod_php. LSAPI PHP is the fastest. Apache's mod_fastcgi is not as fast as ours.
Please checkout our benchmark page.
Last edited by mistwang; 10-11-2006 at 10:26 AM..
|

10-19-2006, 04:01 PM
|
|
Member
|
|
Join Date: Oct 2006
Posts: 28
|
|
|
I just wanted to add a quick note that I am running both PHP 4 and PHP 5.1 as LSAPI. Not only does it work great, but it was also incredibly easy to set up... Way easier than getting them running them in parallel in Apache (where one has to be CGI unless you run 2 Apache servers and proxy one to the other... yuk ;-) )
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 09:51 AM.
|
|