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

Go Back   LiteSpeed Support Forums > External Applications > PHP > [solved] Use different PHP versions on same server

Reply
 
Thread Tools Display Modes
  #1  
Old 11-13-2012, 12:10 AM
Sindre Sindre is offline
Member
 
Join Date: Dec 2008
Posts: 31
Question [solved] Use different PHP versions on same server

Hello,

I have compiled both PHP 5.2 and 5.3 binaries using the LSWS console and followed the instructions here:
http://www.litespeedtech.com/support...rol_panel_lsws

I have created the external applications and configured the script handlers. However, adding the AddHandler/AddType directives to .htaccess have no effect. The default handler is set up with PHP 5.3 and I want to force 5.2 through .htaccess.

I have tried the following variations:

Code:
AddHandler application/x-httpd-php52 php
AddHandler application/x-httpd-php52 .php
AddType application/x-httpd-php52 php
AddType application/x-httpd-php52 .php
A script handler with "php52" suffix exists, which uses the external app. which points to the PHP 5.2 binary. I tripple checked everything and it should be correct.

When I load the PHP script it uses PHP 5.3 no matter what. I monitored the sockets, and I do see that the PHP 5.2 socket (uds://tmp/lshttpd/lsphp52.sock) is created as well.

The strange thing, though, is that I have the exact same setup on another server and it works fine.

Any thoughts?

Last edited by NiteWave; 11-13-2012 at 04:52 PM..
Reply With Quote
  #2  
Old 11-13-2012, 12:25 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
please refer:
http://httpd.apache.org/docs/2.2/mod...tml#addhandler
Override: FileInfo

make sure in your vhost setting, FileInfo is able to override.
Reply With Quote
  #3  
Old 11-13-2012, 02:33 AM
Sindre Sindre is offline
Member
 
Join Date: Dec 2008
Posts: 31
Actually, after some more testing it does work. I was testing with a php file in /usr/local/apache/htdocs (this is a cPanel server).

For some reason, LiteSpeed would not pick up the .htaccess changes from this location, but when ran from a user directory (/home/<user>/public_html) it seems to work fine.

Thanks anyway.
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 02:38 AM.



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