LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > PHP4 and PHP5.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2006, 04:16 AM
NetJaro NetJaro is offline
New Member
 
Join Date: Jul 2006
Posts: 4
Default PHP4 and PHP5.

Hello!

Sorry for my English, I'm from Poland :-)

Now I have PHP4. But I want have PHP4 and PHP5 (on one server, on LiteSpeed).
As I can start up PHP4 and PHP5 on server?
(file *.php - PHP4, file *.php5 - php5).

Thanks,
Martin.

Last edited by NetJaro; 07-15-2006 at 04:24 AM..
Reply With Quote
  #2  
Old 07-15-2006, 08:45 AM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
yes you can. define the fast-cgi handlers like that. just make them use different sockets.
Reply With Quote
  #3  
Old 08-29-2006, 04:07 PM
aemadrid aemadrid is offline
Senior Member
 
Join Date: Aug 2006
Posts: 57
Default PHP4 AND PHP5 with LSAPI?

Quote:
Originally Posted by ts77 View Post
yes you can. define the fast-cgi handlers like that. just make them use different sockets.
Is there any way to get PHP4 and PHP5 working through LSAPI instead of FCGI? I'm new to LS so forgive me if I'm wrong but I thought LSAPI was the better performer.

Thanks in advance,


Adrian Madrid
Reply With Quote
  #4  
Old 08-29-2006, 04:16 PM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
Quote:
Originally Posted by aemadrid View Post
Is there any way to get PHP4 and PHP5 working through LSAPI instead of FCGI? I'm new to LS so forgive me if I'm wrong but I thought LSAPI was the better performer.

Thanks in advance,


Adrian Madrid
same applies to lsapi of course.
I'm just using only fcgi because of missing lsapi patches in gentoo's php and my own thoughts of stability (not meaning lsapi is unstable, just that its not included anywhere yet).
Reply With Quote
  #5  
Old 08-29-2006, 04:27 PM
aemadrid aemadrid is offline
Senior Member
 
Join Date: Aug 2006
Posts: 57
Default PHP4 and PHP5 with LSAPI

Quote:
Originally Posted by ts77 View Post
same applies to lsapi of course.
I'm just using only fcgi because of missing lsapi patches in gentoo's php and my own thoughts of stability (not meaning lsapi is unstable, just that its not included anywhere yet).
Forgive me again but I'm just an LS noobie. How do you setup LSAPI for both? Do you compile PHP4 and PHP5 and copy php4 to lsphp4 and php5 to lsphp5 tot he /lswsinstall/fcgi-bin/ directory? Just trying to figure out how to setup things so LS can use both php4 and php5 in different context. BTW, a Wiki HowTo would be really cool.

Thanks gain,


Adrian Madrid
Reply With Quote
  #6  
Old 08-29-2006, 04:35 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
Adrian,

Here is our wiki how-to for PHP 4/5 with LSAPI:

http://www.litespeedtech.com/support/wiki/doku.php

You can also find our wiki by using our top site menu under "Support".
Reply With Quote
  #7  
Old 08-29-2006, 04:43 PM
aemadrid aemadrid is offline
Senior Member
 
Join Date: Aug 2006
Posts: 57
Default PHP4 and PHP5 with LSAPI

Quote:
Originally Posted by xing View Post
Adrian,

Here is our wiki how-to for PHP 4/5 with LSAPI:

http://www.litespeedtech.com/support/wiki/doku.php

You can also find our wiki by using our top site menu under "Support".
Xing,

I have read and followed that WIKI to get PHP4 running through LSAPI. My question is, how do I add PHP5 to the mix so I can do both PHP4 and PHP5 through LSAPI. In step 6 of the wiki says:

cd /lswsinstall/fcgi-bin/
mv lsphp lsphp.old
cp /php-src/sapi/litespeed/php lsphp

Now that I have already done that for PHP4 and want to add PHP5 what do I do? Do I copy the new PHP5 compiled as lsphp5? What else do I need to do to have both available?

Thanks in advance,


Adrian Madrid
Reply With Quote
  #8  
Old 08-29-2006, 04:54 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
1) You can cp the php4 binary as lsphp4 and php 5 binary as lsphp5 in the fcgi-bin directory.

2) Modify the "Server -> External Apps" definitions so that the current one is renmed to like php4LSAPI and points to lsphp4 and the socket is renamed to like lsphp4.sock.

Then create a new "Server -> External App" definition just like the php4 one except all references to php4 is replaced with php5.

3) Go to "Server -> Script Handler" and here you decide which php (4 or 5) you want to use with the default .php extension. Then create a new script handler to bind to bind the other to a file suffix of your choice. For example, let .php bind to php4 and .php5 for php5 or vice versa.
Reply With Quote
  #9  
Old 08-30-2006, 09:48 AM
aemadrid aemadrid is offline
Senior Member
 
Join Date: Aug 2006
Posts: 57
Quote:
Originally Posted by xing View Post
...
3) Go to "Server -> Script Handler" and here you decide which php (4 or 5) you want to use with the default .php extension. Then create a new script handler to bind to bind the other to a file suffix of your choice. For example, let .php bind to php4 and .php5 for php5 or vice versa.
Thanks! That part is what I was looking for. This seems to me the cleanest implementation of PHP4/PHP5 in one server. If I understand this right I could have two contexts in a vhost serving with a different PHP in each (e.g., /blog with php4 and /crm with php5). Heck, I could have all versions of PHP I want that. I must say I'm impressed with LS so far. It has a learning curve but so far it seems worth it.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with php4 as fcgi both remote/local ts77 Install/Configuration 6 10-02-2006 04:46 PM
Suexec on cPanel slimak Apache Migration/Compatibility 15 09-28-2006 01:21 PM


All times are GMT -7. The time now is 10:08 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.