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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Various Post Installation Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 12-13-2008, 02:32 PM
Tony Tony is offline
Senior Member
 
Join Date: Dec 2008
Posts: 133
Question Various Post Installation Questions

After a bit of work I managed to get LiteSpeed to run on a semi production server. I noticed several things along the way and hacked up my own solutions to the problems but I'm curious if these issues are normal or not.

Installation dir: /usr/local/lsws
cPanel System


I was unable to use the build matching PHP from the whm plugin until I compiled PHP5 through the compile PHP option in lsws. I copied the configure line from the cPanel build and put it into lsws and it compiled fine while the matching one would not. After I did this I was able to build the matching PHP. I am not sure if that's normal or not.

I also noticed after building the matching php the ini directory was now the cPanel one of /usr/local/lib/php.ini rather the lsws one.

The CLI's were not changed upon this build matching configuration. So /usr/bin/php could not use the newly built PDO modules as it threw various errors. I made a symbolic link to /usr/local/lsws/lsphp5/bin/php which I had previously built using the same configure line as the old cpanel apache system. This made so the CLI version had no problems with the PDO extensions.

Obviously using /usr/local/lsws/lsphp5/bin/php I had different ini's so I just made a symbolic link to the ini that cPanel makes.

So I am wondering is this at all normal? I worked around the problems to make a sane setup to a degree. I can see there being problems if PHP 5.2.9 was to come out. I'd need to build multiple PHP's in order to keep the setup working properly since the CLI version does not match that of what the web server is using. So timing could be a problem.
Reply With Quote
  #2  
Old 12-13-2008, 03:03 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Sometimes, user need to do "make clean" under /home/cpeasyapache/src/php-5.2.x
then build matching PHP.

When you build matching PHP from WHM, the PHP will share the same php.ini as Apache mod_php. With LSWS admin console, you have the flexibility to specify the location of php.ini .

To use the same php.ini or separate one is up to you. Some user may have difficulty to keep two php.ini in sync, so, we opted for using one php.ini .

When you need to update PHP for the whole server, you need to switch back to Apache, then update Apache setup with cpeasyapache, then build matching PHP for LSWS, then switch back to LSWS. If cPanel would like to add native support for LSWS, it is possible to update everything in one step.

CLI PHP is only get updated with cpeasyapache.
Reply With Quote
  #3  
Old 12-13-2008, 03:52 PM
Tony Tony is offline
Senior Member
 
Join Date: Dec 2008
Posts: 133
Okay that all makes sense.

So probably after the initial setup it be easier to just compile PHP through the lsws panel or even from the start through there. Adding Zend, Ioncube, PDO ect. ect. are trivial anyways. There shouldn't be a reason to switch back to Apache so I see no reason to keep it's PHP up to date anyways.
Reply With Quote
  #4  
Old 12-13-2008, 05:14 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Easy apache will install all libraries for you if anything missing on your server. For unexperienced people, it is a good idea to run easy apache first, then build matching PHP.

May not be necessary for experienced admins.
Reply With Quote
  #5  
Old 12-29-2008, 09:45 AM
Tony Tony is offline
Senior Member
 
Join Date: Dec 2008
Posts: 133
Quote:
Originally Posted by mistwang View Post
When you build matching PHP from WHM, the PHP will share the same php.ini as Apache mod_php. With LSWS admin console, you have the flexibility to specify the location of php.ini .

To use the same php.ini or separate one is up to you. Some user may have difficulty to keep two php.ini in sync, so, we opted for using one php.ini .
Throwing this up on a semi production environment now and I was hoping to just not do the hack up I did while testing. I'm close except for one thing.

It seems with the PDO modules the build matching library doesn't work out to well. You end up with the litespeed version being unable to load the pdo modules. At least in my environment that seems to be the case. If you drop in the ones generated from the build then you end up with the old php being unable to load the modules. This is a problem if you have say the CLI PHP still available.

So how can one specify a different php.ini via the admin console? I can't find where that's an option.
Reply With Quote
  #6  
Old 12-29-2008, 11:01 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
That's why we recommend keeping PHP for Apache and LiteSpeed in sync. When you upgrade PHP, upgrade Apache first, then LiteSpeed.
If you want to the easiest soltuion, just "Build Matching PHP" from our WHM plugin.

Or, you need to setup LiteSpeed PHP completely independent to Apache PHP, build LSPHP through admin console and install it to $SERVER_ROOT/lsphp5, so it will use a different php.ini file.

To use a different php.ini without rebuild PHP, you can add a command line parameter to lsphp5 external application like ".../lsphp5 -c <path_to_php.ini>"
Reply With Quote
  #7  
Old 12-29-2008, 11:11 AM
Tony Tony is offline
Senior Member
 
Join Date: Dec 2008
Posts: 133
Quote:
Originally Posted by mistwang View Post
That's why we recommend keeping PHP for Apache and LiteSpeed in sync. When you upgrade PHP, upgrade Apache first, then LiteSpeed.
If you want to the easiest soltuion, just "Build Matching PHP" from our WHM plugin.
Hmm interesting I had the same versions running 5.2.8 on both. I did notice that it complained that the source folder was missing and it just grabbed a fresh one. I imagine that is what caused the problems with the pdo loaders maybe? I ended up copying the cli built and replacing the ones that cpanel built a week ago and also using the modules built when the litespeed version was made.

I have another machine lined up to do on Wednesday I'll rebuild php once from cPanel then do the matching php and see if it still has problems with the pdo loaders not being compatible.

Last edited by Tony; 12-29-2008 at 11:16 AM..
Reply With Quote
  #8  
Old 12-31-2008, 10:28 AM
Tony Tony is offline
Senior Member
 
Join Date: Dec 2008
Posts: 133
The pdo's made by cPanel's easyphp were still not compatible after building right from the same source. So I am guessing that php will only use the modules that were compiled with it. Easy enough fix for me copy the CLI made by the matching litespeed library over the system php cli.
Reply With Quote
  #9  
Old 12-31-2008, 12:23 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Can you please post the whole PHP configuration parameters. we will try to reproduce the problem and automate the installation in our lab.
Reply With Quote
  #10  
Old 12-31-2008, 12:30 PM
Tony Tony is offline
Senior Member
 
Join Date: Dec 2008
Posts: 133
Quote:
'./configure' '--enable-bcmath' '--enable-calendar' '--enable-dbase' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zend-multibyte' '--enable-zip' '--prefix=/usr/local' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mime-magic' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pgsql=/usr' '--with-pic' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-ttf' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr' '--with-litespeed'

No litespeed on the easyapache compile but everything else is the same for the php settings.
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:24 PM.



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