[solved] Build PHP with LSAPI

Discussion in 'Install/Configuration' started by Frankk912, Jun 3, 2013.

  1. Frankk912

    Frankk912 New Member

    Hi, is it possible to build PHP 5.4.15 from source with LSAPI 6.2? I replaced the LSAPI files in the source with the 6.2 ones, but it won't compile. Says "make: *** No rule to make target `litespeed', needed by `all'. Stop." I believe PHP still comes with 5.5.
    Last edited by a moderator: Jun 12, 2013
  2. NiteWave

    NiteWave Administrator

    edit /usr/local/lsws/admin/html/utility/build_php/buildconf.inc.php
    search "LSAPI_VERSION", then change to
    define ('LSAPI_VERSION', '6.2');

    then build php from admin console.

    you may need cleanup folder
    /usr/local/lsws/phpbuild/php-5.4.15
    first for a clean build.
  3. Frankk912

    Frankk912 New Member

    Can it be built from the command line without LSWS?
  4. NiteWave

    NiteWave Administrator

  5. Frankk912

    Frankk912 New Member

    I get the error from my original post when compiling. It only happens when I use the latest sapi source files.
  6. webizen

    webizen New Member

    please do it from admin console (4.2.3).
  7. Frankk912

    Frankk912 New Member

    Is there a way to override the version of APC the admin console downloads?
  8. webizen

    webizen New Member

  9. Frankk912

    Frankk912 New Member

    Thanks for the help
  10. AndrewT

    AndrewT New Member

    [solved]

    We really need a version of LSAPI that we can use to manually compile PHP 5.4 with. Not everyone wants to use the web console to compile their PHP.
    Last edited by a moderator: Jun 12, 2013
  11. tomksoft

    tomksoft New Member

    What exactly are you trying to achieve?
    I am preparing LiteSpeed for fast deployment on a new cluster and what I did was I compiled LSPHP using web console, but after that I copied preparation and install scripts from /usr/local/lsws/phpbuild/. These can be modified as per your needs(for example, adding CFLAGS) and redeployed on other machines.
  12. AndrewT

    AndrewT New Member

    They simply need to provide download links for the latest version of LSAPI that is compatible with PHP 5.4, just as they do for PHP 5.3. This really isn't asking much. Having to go through their web console, build PHP, and then grab the files from their build directory shouldn't be necessary.
  13. webizen

    webizen New Member

    For 5.3 and 5.4 (ship with an LSAPI), just unpack the LSAPI tarball and copy *.c and *.h to "php-src/sapi/litespeed/" folder.

    For 5.2 (does not ship with LSAPI), unpack the tarball and move the whole litespeed folder to "php-src/sapi" folder.
  14. AndrewT

    AndrewT New Member

    As has already been discussed elsewhere on these forums and in this thread, the LSAPI (6.2) provided for download on your website does not work with PHP 5.4. It does work fine for PHP 5.3. The bundled LSAPI with PHP 5.4 works fine but that is only version 5.5.

    Edit: I do see now that you mentioned only copying *.c and *.h for PHP 5.3/5.4. Will have to get that a try I guess. Although replacing it entirely works fine on PHP 5.3.
    Last edited: Jun 11, 2013
  15. AndrewT

    AndrewT New Member

    Replacing the PHP 5.4 bundled *.c and *.h files with those in the 6.2 download works without issue. Thanks.
  16. Frankk912

    Frankk912 New Member

    I can confirm that PHP 5.5.0 builds fine with LSAPI 6.2 (when only .c and .h files are replaced). Thanks

Share This Page