Trying Litespeed, but having a few problems

#1
I'm trying Litespeed out on the standard edition before purchasing the Enterprise one for a quad core machine. This is to serve as a replacement to Apache in a cPanel/WHM environment.

I've installed it perfectly fine, and built PHP 5.2.6 using the LiteSpeed admin console. However, most of my PHP software now just displays a blank page. I went to turn on errors and to add extra modules to php.ini, only I can't seem to find the php.ini file.

Configuration File (php.ini) Path /opt/lsws/lsphp5/lib

There's no file there that I can find.

Secondly, whenever I try access a folder, say http://ipaddress/~username/folder-example without a trailing slash, it will just redirect back to http://ipaddress/folder-example. Since it's just a testing machine with no domains, I can't say how it would react with proper domains.

Any input is appreciated! :)
 
#2
I reinstalled LiteSpeed and found a php.ini in the /php folder, so I moved it over to lsphp5/lib after noticing a php.ini file was never being loaded. Oops!

Loaded Configuration File /opt/lsws/lsphp5/lib/php.ini

Anyhow, I've turned logging on, but I'm still getting blank pages along with Fatal error: Call to undefined function mysql_connect() on others. I've tried to sort out MySQL but with no luck as yet.
 
Last edited:
#4
I did, but still the same problem.

I uninstalled and reinstalled Litespeed to get a fresh start, so it's on 4.4.9 again now.
 
#6
I installed the plugin to give it a try, but the build failed and seems to have got Litespeed stuck serving 503 pages.

The last lines are:
Code:
/opt/php_with_imap_client//lib/libc-client.a(osdep.o): In function `ssl_onceonlyinit':
/home/cpeasyapache/src/imap-2006k/c-client/osdep.c:300: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
ext/standard/basic_functions.o:(.data+0x1cc4): undefined reference to `zif_chroot'
collect2: ld returned 1 exit status
make: *** [sapi/litespeed/php] Error 1
**ERROR** Could not compile PHP
I tried to switch to Apache using the plugin to try something out, except Apache failed to start and I couldn't free up port 80 again without rebooting the machine.

Edit: After an earlier build of version 5 that had working MySQL (but nothing much else), MediaWiki displayed the following error in place of a blank page, although it might be okay if I can get PHP built properly as it was in cPanel:
exception 'PDOException' with message 'SQLSTATE[HY000] [14] unable to open database file' in /home/ohserve/public_html/wiki/includes/db/DatabaseSqlite.php:52 Stack trace: #0 /home/ohserve/public_html/wiki/includes/db/DatabaseSqlite.php(52): PDO->__construct('sqlite:/home/oh...', 'ohserve_ohserve', '111111') #1 /home/ohserve/public_html/wiki/includes/db/DatabaseSqlite.php(31): DatabaseSqlite->open('localhost', 'ohserve_ohserve', '111111', 'ohserve_ohserve') #2 /home/ohserve/public_html/wiki/includes/db/LoadBalancer.php(646): DatabaseSqlite->__construct('localhost', 'ohserve_ohserve', '111111', 'ohserve_ohserve', 1, 16) #3 /home/ohserve/public_html/wiki/includes/db/LoadBalancer.php(528): LoadBalancer->reallyOpenConnection(Array) #4 /home/ohserve/public_html/wiki/includes/db/LoadBalancer.php(451): LoadBalancer->openConnection(0, false) #5 /home/ohserve/public_html/wiki/includes/GlobalFunctions.php(2564): LoadBalancer->getConnection(-1, Array, false) #6 /home/ohserve/public_html/wiki/includes/MessageCache.php(301): wfGetDB(-1) #7 /home/ohserve/public_html/wiki/includes/MessageCache.php(264): MessageCache->loadFromDB('en') #8 /home/ohserve/public_html/wiki/includes/MessageCache.php(606): MessageCache->load('en') #9 /home/ohserve/public_html/wiki/includes/MessageCache.php(543): MessageCache->getMsgFromNamespace('Mainpage', 'en') #10 [internal function]: MessageCache->get('mainpage', true, true) #11 /home/ohserve/public_html/wiki/includes/StubObject.php(58): call_user_func_array(Array, Array) #12 /home/ohserve/public_html/wiki/includes/StubObject.php(76): StubObject->_call('get', Array) #13 [internal function]: StubObject->__call('get', Array) #14 /home/ohserve/public_html/wiki/includes/GlobalFunctions.php(467): StubObject->get('mainpage', true, true) #15 /home/ohserve/public_html/wiki/includes/GlobalFunctions.php(432): wfMsgGetKey('mainpage', true, true, true) #16 /home/ohserve/public_html/wiki/includes/GlobalFunctions.php(380): wfMsgReal('mainpage', Array, true, true) #17 /home/ohserve/public_html/wiki/includes/Title.php(293): wfMsgForContent('mainpage') #18 /home/ohserve/public_html/wiki/includes/Wiki.php(105): Title::newMainPage() #19 /home/ohserve/public_html/wiki/index.php(60): MediaWiki->checkInitialQueries(NULL, 'view') #20 {main}
 
Last edited:

mistwang

LiteSpeed Staff
#7
You can try the following:

Run easyapache to rebuild apache, no need to change any option.
Then try building matching PHP binary from LiteSpeed.

Then run LiteSpeed parallel to Apache with a port offset, so you can test it without affect your normal web traffic.
 
#8
I've rebuilt Apache now and have LS and Apache running side by side, but the PHP build for LiteSpeed is still failing.

Code:
/home/cpeasyapache/src/imap-2006k/c-client/osdep.c:300: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
ext/standard/basic_functions.o:(.data+0x1cc4): undefined reference to `zif_chroot'
collect2: ld returned 1 exit status
make: *** [sapi/litespeed/php] Error 1
**ERROR** Could not compile PHP
 

mistwang

LiteSpeed Staff
#9
Please try

cd /home/cpeasyapache/src/php-5.2.6
make clean

Then try building matching PHP binary.

If it still not working, you have to use "Compile PHP" from web console, make sure to set "Install Path Prefix" to "/usr/local", "configuration parameters" should be the same as that from Apache phpinfo() output, minus apache specific options.
 
#10
It worked after I did make clean. Thanks!

The only problem that seems to be left is the issue of blank pages on certain PHP scripts such as MediaWiki when accessed through Litespeed. I found another post when searching for similiar issues and they solved it through a reinstall, but since I've done that several times already...

I've checked the error logs but nothing relevant seems to be there.
 
Last edited:

mistwang

LiteSpeed Staff
#11
Do you have PHP error log enabled in php.ini?
You can try increasing the memory limit in php.ini as well as lsphp5 external app memory soft/hard limit.
 
#12
The logging is turned on in php.ini on both display errors and error logging.

I've tried playing with the memory settings a bit, but haven't had any luck.
 
Top