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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > [solved] PHP 5.2.X + PHP 5.3.X side-by-side on a LSWS+cPanel Server

Reply
 
Thread Tools Display Modes
  #1  
Old 02-03-2011, 11:32 AM
MikeDVB MikeDVB is offline
Senior Member
 
Join Date: Jul 2009
Posts: 218
Default [solved] PHP 5.2.X + PHP 5.3.X side-by-side on a LSWS+cPanel Server

Hello!

I know that it's possible to run PHP 5.3.X and 5.2.X side by side and I have a gist of how to get it done. We're already running 5.2.X on our servers.

I've guessed this so far:
  1. Build PHP 5.3.X manually, it will need it's own folder for the binaries, it's own php.ini, extension directories, modules, etc...
  2. Add a new LSAPI handler in LiteSpeed for the new PHP binary.
I also know about these two commands for the ./configure:
Code:
./configure --prefix=/wherever/php5.3 --with-config-file-path=/wherever/php5.3
I'm trying to work out if I need to do anything else special with the ./configure to install it separately.

Anybody have any thoughts/tips/suggestions on installing 5.3 on a server with 5.2 without conflicts? I'm going to get it working one way or another since I know it's possible and I'll test it on our dev box before putting it on a production server obviously.

Just thought, if anybody has "Been there, done that" then there would be no need to re-invent the wheel.

Last edited by NiteWave; 11-02-2011 at 06:36 PM..
Reply With Quote
  #2  
Old 02-03-2011, 11:50 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
http://www.litespeedtech.com/support...rol_panel_lsws
Reply With Quote
  #3  
Old 02-03-2011, 11:57 AM
MikeDVB MikeDVB is offline
Senior Member
 
Join Date: Jul 2009
Posts: 218
Quote:
Originally Posted by webizen View Post
Interesting I didn't find that in my searching. I'll give it some testing on the dev server.
__________________
Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
http://www.mddhosting.com/
Reply With Quote
  #4  
Old 09-16-2011, 12:14 PM
Kevin K Kevin K is offline
Member
 
Join Date: Dec 2010
Posts: 10
I am interested in doing this. Is this possible to do all form the admin panel is Cpanel. If so do you have any step by step directions?
Reply With Quote
  #5  
Old 09-16-2011, 08:19 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
it is possible to do this by compiling PHP (not matching php) from from admin cp (cpanel -> plugins -> litespeed web server -> admin web console -> Actions -> Compile PHP). Once done, as described in http://www.litespeedtech.com/support...lsws#procedure, you need to
1. Create External App at server level to link to the PHP just built
2. Create Script Handler for each Ext App
3. Add MIME Type for corresponding handlers in vhost httpd.conf or user per directory .htaccess
Reply With Quote
  #6  
Old 11-02-2011, 12:49 PM
Kevin K Kevin K is offline
Member
 
Join Date: Dec 2010
Posts: 10
I have been working to get this working and all seems fine except for the add handler is not working. I have went through all the steps and this is what I have so far:


This shows that both the 5.2.17 and 5.3.8 versions are indeed compiled:
Code:
root@*****[/usr/local/lsws/fcgi-bin]# ls -l /usr/local/lsws/fcgi-bin
total 48792
drwxr-xr-x  2 root root     4096 Nov  2 20:35 ./
drwxr-xr-x 16 root root     4096 Nov  2 19:58 ../
-r-xr-xr-x  1 root root     3342 May  8 21:49 lsperld.fpl*
-r-xr-xr-x  1 root root  2280672 May  8 21:49 lsphp*
lrwxrwxrwx  1 root root        7 May  8 21:49 lsphp4 -> ./lsphp*
lrwxrwxrwx  1 root root       12 Nov  2 20:35 lsphp5 -> lsphp-5.2.17*
-rwxr-xr-x  1 root root 22225638 May  8 21:56 lsphp-5.2.17*
-rwxr-xr-x  1 root root 25361172 Nov  2 19:59 lsphp-5.3.8*
-r-xr-xr-x  1 root root     4691 Nov  2 19:44 RailsRunner.rb*
-r-xr-xr-x  1 root root     1095 Nov  2 19:44 RailsRunner.rb.2.3*

Added the External App for the 5.3 extension:
Code:
LSAPI App	lsphp53	uds://tmp/lshttpd/lsphp53.sock
Also added the Script Handler:
Code:
php53	LiteSpeed API	[Server Level]: lsphp53
I can also switch back and forth between the versions via ln -sf lsphp-5.2.17 lsphp5 and ln -sf lsphp-5.3.8 lsphp5, but if I add the handler in an accounts .htaccess file:

Code:
 AddHandler application/x-httpd-php53  .php
the phpinfo still show the version at 5.2.17. So I am a bit lost here. I am not entirely sure if this would show on the phpinfo or not, but I would think it would.

Is there any other way to verify this is working correctly? Any help would be appreciated.
Reply With Quote
  #7  
Old 11-02-2011, 01:00 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
make sure lsphp53 external app is use lsws/fcgi-bin/lsphp-5.3.8

not lsws/fcgi-bin/lsphp5


enable debug logging and check detail log.
Reply With Quote
  #8  
Old 11-02-2011, 01:13 PM
Kevin K Kevin K is offline
Member
 
Join Date: Dec 2010
Posts: 10
Quote:
Originally Posted by mistwang View Post
make sure lsphp53 external app is use lsws/fcgi-bin/lsphp-5.3.8

not lsws/fcgi-bin/lsphp5


enable debug logging and check detail log.
Yup that was the problem. Many thanks!!!
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


All times are GMT -7. The time now is 04:43 AM.



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