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

Go Back   LiteSpeed Support Forums > External Applications > PHP > [Solved] Multiple Versions of PHP using suexec?

Reply
 
Thread Tools Display Modes
  #11  
Old 01-20-2011, 12:57 AM
outeredge outeredge is offline
Member
 
Join Date: Sep 2010
Posts: 25
1. Yes, that's a physical file. It seems to be the PHP CLI binary for 5.3, so I guess that doesn't get touched after a PHP re-compile.

2. 'which php' shows '/usr/bin/php' so it's looking at the file mentioned in point 1 above based on my symlink. I just find it odd that re-compiling php doesn't overwrite the CLI binary in the lsphp5/bin folder.

That still raises the question, where is the PHP CLI for Php 5.2 that i've built?
Reply With Quote
  #12  
Old 01-20-2011, 01:37 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
You should do below instead.

ln -sf /usr/local/lsws/fcgi-bin/lsphp5 /usr/bin/php
Reply With Quote
  #13  
Old 01-20-2011, 01:41 AM
outeredge outeredge is offline
Member
 
Join Date: Sep 2010
Posts: 25
But /usr/local/lsws/fcgi-bin/lsphp5 -v isn't CLI

PHP 5.3.3 (litespeed) (built: Dec 21 2010 17:11:59)

Whereas /usr/local/lsws/lsphp5/bin/php -v is:

PHP 5.3.3 with Suhosin-Patch (cli) (built: Dec 21 2010 17:12:11)

- Shouldn't we be giving our SSH users the CLI binary to use?
Reply With Quote
  #14  
Old 01-20-2011, 02:36 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
From your screenshot, lsphp5 is currently pointing to php 5.3.3 which matches with the cli binary. That looks fine to me.

You can revert /usr/bin/php.

Back to your question:

When you recompiled 5.2, did you still use "/usr/local/lsws/lsphp5" as install path prefix ? If so, /usr/local/lsws/lsphp5/bin/php should be the CLI binary of the recompiled php 5.2. AND /usr/local/lsws/lsphp5/bin/lsphp is the litespeed counterpart which is identical to the recompiled 5.2 binary copy in /usr/local/lsws/fcgi-bin. You can do following to verify:

ls -l /usr/local/lsws/fcgi-bin/lsphp* /usr/local/lsws/lsphp5/bin/*php

A possible cause of lsphp5 being mismatch with cli binary in /usr/local/lsws/lsphp5/bin/php is that php 5.2 was recompiled with a different Install Path Prefix (say /usr/local/lsws/lsphp52). The matching cli binary would be in /usr/local/lsws/lsphp52/bin/php.
Reply With Quote
  #15  
Old 01-25-2011, 06:45 AM
outeredge outeredge is offline
Member
 
Join Date: Sep 2010
Posts: 25
Ah, of course. It was the /usr/local/lsws/lsphp52 folder I'd forgotten about!

Thanks!!
Reply With Quote
  #16  
Old 02-07-2011, 04:51 AM
outeredge outeredge is offline
Member
 
Join Date: Sep 2010
Posts: 25
Another problem has cropped up, we are using SuExec in the Apache config files which works fine when not using AddType to switch to PHP5.2.

However as soon as we use the below, Litespeed switches to running as the default user (www-data in our case) so the suexec user is ignored:

AddType application/x-httpd-php52 php

Could you let me know if this is a bug and if you can fix this ASAP?
Reply With Quote
  #17  
Old 02-07-2011, 09:07 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
suEXEC capable suffixes are : "php, php4, php5, php53, phtml, php6, fastphp". avoid "php52".
Reply With Quote
  #18  
Old 04-09-2011, 03:41 AM
MikeDVB MikeDVB is offline
Senior Member
 
Join Date: Jul 2009
Posts: 218
Quote:
Originally Posted by mistwang View Post
suEXEC capable suffixes are : "php, php4, php5, php53, phtml, php6, fastphp". avoid "php52".
Does this apply to 4.1RC4 as well or is there a newer 4.1 RC available?
__________________
Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
http://www.mddhosting.com/
Reply With Quote
  #19  
Old 04-09-2011, 07:11 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
tested, apply for 4.1RC4.
Reply With Quote
  #20  
Old 04-19-2011, 01:21 AM
slimak slimak is offline
Senior Member
 
Join Date: Aug 2006
Posts: 67
Quote:
Originally Posted by mistwang View Post
suEXEC capable suffixes are : "php, php4, php5, php53, phtml, php6, fastphp". avoid "php52".
Why should we avoid "php52"? If we set the version 5.3.x as default for suffix "php5" then we will not have any suffix for version 5.2.x. Could you add possibility to use also the "php52" suffix?
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 10:36 AM.



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