[solved] Build PHP with LSAPI

#1
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:

NiteWave

Administrator
#2
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.
 

AndrewT

Well-Known Member
#10
[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:
#11
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.
 

AndrewT

Well-Known Member
#12
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.
 

webizen

Well-Known Member
#13
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.
 

AndrewT

Well-Known Member
#14
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:
Top