lsapi

Discussion in 'Install/Configuration' started by hopfi2k, May 22, 2005.

  1. hopfi2k

    hopfi2k New Member

    Hi,

    I'm facing troubles compiling php with lsapi support (Litespeed 2.1RC1) on FreeBSD 5.x. This is the error message from make:

    In file included from /root/php-4.3.11/sapi/litespeed/lsapilib.c:50:
    /usr/include/netinet/tcp.h:44: error: syntax error before "tcp_seq"
    /usr/include/netinet/tcp.h:45: error: syntax error before "tcp_cc"
    /usr/include/netinet/tcp.h:55: error: syntax error before "u_short"
    *** Error code 1

    Stop in /root/php-4.3.11.

    The following configure statement was used: ./configure --with-config-file-path=../conf --with-openssl --with-zlib --enable-gd-native-ttf --with-gettext --with-litespeed

    Any ideas?

    Best Regards
    Andy
  2. mistwang

    mistwang LiteSpeed Staff

    Please try add a line
    Code:
    #include <sys/types.h>
    before including tcp.h, if it does not work add
    Code:
    #include <inttypes.h>
    .
  3. hopfi2k

    hopfi2k New Member

    That did the trick - many thanks!

    It seems that the include statement for types.h is _below_ tcp.h. After moving it before it compiles fine.

    Best regards,
    Andy
  4. joe

    joe Member

    I got through this bug with the help above, but now how do I use this binary I built??

    lsphp -v returns
    www# ./lsphp -v
    PHP 5.0.4 (litespeed) (built: May 27 2005 16:05:04)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
    www#

    but my GUI for 2.06 doesn't offer any place to use it. Under Server -> Ext Apps I don't see LS SAPI as an option. I read and re-read the LSAPI page here but I'm lost. I got standard php scripts defined, but now I can't get lsapi defined.

    Running on FreeBSD, php 5.0.4 is running fine as a fast-cgi, just not with lsapi.

    My goal is to get .htaccess mod_rewrite functionality in PostNuke working. Certain modules cry it ain't there yet the logs show tons of hits for the fav.icon file (which I ain't made yet)

    Help?
  5. mistwang

    mistwang LiteSpeed Staff

    Please try 2.1RC1, lsapi support is only available in 2.1x releases.
  6. joe

    joe Member

    doh! :oops:

    Please make that more clear in the Docs.
  7. mistwang

    mistwang LiteSpeed Staff

    Will do.
  8. hopfi2k

    hopfi2k New Member

    lsapi server-restarts/crashes

    Although I managed to compile and run lsapi under FreeBSD now, I'm facing around 200-500 litespeed restarts a day :-(

    This is using kqueues, what I will now change to polling.

    Are there any know issues with so much server-crashes and restarts using lsapi under FreeBSD (5.x)?
  9. mistwang

    mistwang LiteSpeed Staff

    I think the core dump is kqueue related, not lsapi, please try poll, see if it restart so often.
    If you can make it dump a core file and send it to us for analysis, we will iron out the bug quickly. :)

    You may need to change some kernel configuration to allow core dump for setuid process.

    George
  10. hopfi2k

    hopfi2k New Member

    You are right, changing to fast-cgi didn't made it any better.

    I'll now try switching from kqueue to polling and report later.
  11. mistwang

    mistwang LiteSpeed Staff

    Please stay with fcgi for production use for now, a pretty bad bug have been found, which will affect post request with large request body. Fix will be in next RC release. Sorry.

    That will be great if you can help us iron out the kqueue bug by sending us a core file, you need to set kern.sugid_coredump to 1 with sysctl to get a core file.

    Thanks.
  12. hopfi2k

    hopfi2k New Member

    Okay, enabled kern_sugid_coredump and waiting to coredump ;-)

    Will let you know as soon it crashes and have a coredump file ready for you.
  13. hopfi2k

    hopfi2k New Member

    Link to a fresh coredump PM'd to you, mistwang ;-)

    If I can provide any further informations/coredumps please let me know and I'll do my to help making litespeed 2.1 even better.

Share This Page