Trying Litespeed, but having a few problems

Discussion in 'Install/Configuration' started by Mantis, Dec 1, 2008.

  1. Mantis

    Mantis New Member

    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. Mantis

    Mantis New Member

    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: Dec 1, 2008
  3. closet geek

    closet geek New Member

    Did you compile PHP with MySQL support?
  4. Mantis

    Mantis New Member

    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.
  5. mistwang

    mistwang LiteSpeed Staff

    With cPanel/WHM, just "Build matching PHP binary" from our WHM plugin.
  6. Mantis

    Mantis New Member

    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:
    Last edited: Dec 1, 2008
  7. mistwang

    mistwang LiteSpeed Staff

    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. Mantis

    Mantis New Member

    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
  9. mistwang

    mistwang LiteSpeed Staff

    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. Mantis

    Mantis New Member

    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: Dec 1, 2008
  11. mistwang

    mistwang LiteSpeed Staff

    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. Mantis

    Mantis New Member

    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.
  13. mistwang

    mistwang LiteSpeed Staff

    Are you using any PHP opcode cache? Try disabling it see if it helps or not.

Share This Page