[solved] PHP5.2 + PHP5.3 Side by Side

MikeDVB

Well-Known Member
#1
I've managed to get PHP 5.2.17 and PHP 5.3.6 installed side-by-side:
Code:
[root@gemini fcgi-bin]# ./lsphp5 -v
PHP 5.2.17 (litespeed) (built: Apr  9 2011 05:41:35)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and
    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
Code:
[root@gemini fcgi-bin]# ./lsphp53 -v
PHP 5.3.6 (litespeed) (built: Apr  9 2011 06:17:58)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
I duplicated the lsphp5 "LiteSpeed API App Definition" and changed the command accordingly to lsphp53 and duplicated the php5 "Script Handler" with the suffix "php53" and set it to the "php53" API App Definition but when you visit a .php53 page it simply serves the content of the .php53 and if I add "AddType application/x-httpd-php53 php" to the .htaccess of an account it sends the file as a download instead of parsing it.

I'm running 4.1RC4 but I've tried 4.0.20 and I'm really out of ideas here, any suggestions?

For reference:
http://www.screen-shot.net/lsphp5_external_app.png
http://www.screen-shot.net/lsphp53_external_app.png
http://www.screen-shot.net/php_script_handler.png
http://www.screen-shot.net/php53_script_handler.png

I feel like I'm missing something really simple here so don't feel bad about making me look silly. :)
 
Last edited by a moderator:

NiteWave

Administrator
#2
tested on cPanel, php suExec enabled, lsws 4.0.20(latest)
AddType application/x-httpd-php53 php
in .htaccess working as expected.

and checked your attached images, looks all ok.

so no idea as well ... just FYI:
AllowOverride FileInfo is checked?
is any other AddType working in that folder?
for example, try
AddType application/x-httpd-php53 htm
and create a phpinfo page p.htm, what's result of /p.htm?
 

MikeDVB

Well-Known Member
#3
Last edited:

MikeDVB

Well-Known Member
#7
without AddType/AddHandler in .htaccess, is .php working by web access(not command line)?
PHP 5.2 is, yes. If I change the script handler for .php to the php53 lsapi it doesn't seem to change anything (PHP is still processed by php 5.2). If I edit the lsphp5 lsapi to the 5.3 PHP it still uses php 5.2 as well. Not sure what is going on but it's definitely not behaving as expected.

I have fully stopped and restarted LiteSpeed between testing just to make sure the settings were taking effect. This is a brand new just provisioned server so I have no issues giving LiteSpeed staff access to it to do some testing on it if required.
 
Last edited:

MikeDVB

Well-Known Member
#9
ok. please PM the access.
Sent. If you have an IM client, PM me your contact for AIM, MSN, or Skype if you don't mind. I won't contact you for support but it would be nice to discuss this in real-time while you're looking into it so I can give you any further information you may need more quickly.
 

MikeDVB

Well-Known Member
#10
I feel like I'm missing something really simple here so don't feel bad about making me look silly. :)
Which was exactly the case - thanks again NiteWave for looking into this - it turns out I never switched from Apache to LiteSpeed... Completely an idiot move on myself and something I should have thought to check.

I was up with the wife at the hospital all night and came home and decided to get to work as it was too late/early (depending on how you look at it) to go to bed as I'd sleep all day.

Don't worry ... I've "face-palmed" myself already.
 

NiteWave

Administrator
#11
yes, because apache and litespeed are running at the same time, and apache at port 80, litespeed at port 2080 --- In fact Mike's test result was correct: apache don't support
AddType application/x-httpd-php53 php
it's a litespeed unique feature. :)

we have a wiki page for the detail setting already for some time:
http://www.litespeedtech.com/suppor...peed_wiki:multiple_phps_in_control_panel_lsws
Custom PHP Script Handler in LSWS + Control Panel environment
 
Top