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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > LSWS 4.2, chroot and suhosin

Reply
 
Thread Tools Display Modes
  #1  
Old 11-09-2012, 04:36 AM
innovot innovot is offline
New Member
 
Join Date: Nov 2012
Posts: 9
Question LSWS 4.2, chroot and suhosin

Hello:

am trialling LSWS and have installed it within a chroot. The path to LSWS is /chroot/opt/lsws and the root being /chroot. I attempted to compile PHP using the LSWS method but it complained about missing wget/curl even though I copied them into the chroot.

So, I downloaded PHP 5.4.8 and compiled from source using the --with-litespeed and then copied the resuling sapi/litespeed/php binary to /chroot/opt/lsws/fcgi-bin/lsphp.

This works okay but I have also compiled the PHP 5.4 Suhosin extension and unsure where to place it ? is there a specific directory under the chroot it needs to be placed; and indeed any further extensions which we may required.

Many thanks.
Reply With Quote
  #2  
Old 11-09-2012, 07:20 AM
innovot innovot is offline
New Member
 
Join Date: Nov 2012
Posts: 9
Hmmm, interesting if I execute lsphp from the command line one sees
Code:
./lsphp -v
PHP 5.4.8 (litespeed) (built: Nov  9 2012 11:49:07)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
    with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
but when I check it using phpinfo() nothing is showing
Reply With Quote
  #3  
Old 11-09-2012, 08:53 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
in your LSPHP5 external app configuration, Command should be set to '/opt/lsws/fcgi-bin/lsphp'
Reply With Quote
  #4  
Old 11-09-2012, 12:45 PM
innovot innovot is offline
New Member
 
Join Date: Nov 2012
Posts: 9
All running! a good learning process on how PHP handles chroot. Read some articles on net and for new revisions not correct. Will try and find time to write up own experience; once sorted MySQL in chroot as-well. It involved a mount bound from a upstream directory though that is personal preference. Can start to do some testing now Thank you.
Reply With Quote
  #5  
Old 11-09-2012, 01:03 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
good to hear.

for MySQL, if use socket connection (by default /var/lib/mysql/mysql.sock), you need to create a hard link (ln not cp) in chroot (ie, /chroot/var/lib/mysql/mysql.sock).
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 06:12 PM.



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