Recompiling PHP according to Wiki works, but not with litespeed

#1
I am using Red Hat Enterprise Linux 4. I followed the Wiki instructions as best I could and went through it twice to recorded exactly what I did:

1# rm -rf php-4.4.2 (if present, start from scratch)
2# tar -xzvf php-4.4.2.tar.gz
3# cd php-4.4.2
4# wget http://www.litespeedtech.com/packages/lsapi/php-litespeed-2.1.tgz
5# tar -xzvf php-litespeed-2.1.tgz
6# cd .. (This is skipped because it produces an error in step 8)
7# touch ac*
8# ./buildconf --force (if 6 above is not skipped, the following error is produced: -bash: ./buildconf: No such file or directory)
9# ./configure --with-litespeed --with-config-file-path=../conf --with-apxs2=/usr/sbin/apxs --with-mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-sqlite --enable-sqlite-utf8 --with-zlib --with-zlib-dir --with-bz2 --with-gd --enable-gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-ttf --with-freetype-dir=/usr/local/include --with-iconv=/usr/local --with-curl=/usr/local --enable-track-vars --with-gettext --enable-trans-id --enable-ftp --enable-mbstring --with-openssl=/usr/local --with-dom
10# make
11# make install
12# cd /usr/local/lsws/fcgi-bin/
13# mv lsphp lsphp.old
14# cp /usr/local/bin/php lsphp
15# cd ..
16# fcgi-bin/lsphp -v

Step 16 tests it and shows that litespeed is not present:
Code:
[root@plain lsws]# fcgi-bin/lsphp -v
PHP 4.4.2 (cli) (built: May 22 2006 21:26:28)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
After restarting the server, I try to run phpinfo.php, which used to work, but now it times out.
Code:
Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.
I'm good at following directions, though I don't know some of the things that are going on. Perhaps some of the minor improvising I did, such as the one to prevent the error message in step 8 caused the problem?

Looking forward to getting this to work! :)

David
 

mistwang

LiteSpeed Staff
#2
Do not use the "php" binary installed under /usr/local/bin, that is the command line version.
Just copy php-4.4.2/sapi/litespeed/php over.
 

xing

LiteSpeed Staff
#3
Step 3 is wrong. Causing error in Step 6 and 8.

Note that in the wiki we want you to "cd /phpsource/sapi". You need to cd into the sapi folder within the php source directory. Then place the lsapi download there. ....

If you follow the wiki steps verbatim, you should have no problem. =)
 
#4
It's been a couple of days, but I finally got around to it again.

I repeated the steps with the correction and got the following during the make process:

...
sapi/apache2handler/php_functions.o(.text+0x11ba):/php-4.4.2/sapi/apache2handler/php_functions.c:445: undefined reference to `apr_table_elts'
sapi/apache2handler/php_functions.o(.text+0x123f):/php-4.4.2/sapi/apache2handler/php_functions.c:454: undefined reference to `apr_table_elts'
sapi/apache2handler/php_functions.o(.text+0xc79): In function `php_apache_get_version':
/php-4.4.2/sapi/apache2handler/php_functions.c:327: undefined reference to `ap_get_server_version'
collect2: ld returned 1 exit status
make: *** [sapi/litespeed/php] Error 1

Here were my steps exactly:
# rm -rf php-4.4.2
# tar -xzvf php-4.4.2.tar.gz
# cd php-4.4.2/sapi
# wget http://www.litespeedtech.com/packages/lsapi/php-litespeed-2.1.tgz
# tar -xzvf php-litespeed-2.1.tgz
# cd ..
# touch ac*
# ./buildconf --force
# ./configure --with-litespeed --with-config-file-path=../conf --with-apxs2=/usr/sbin/apxs --with-mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-sqlite --enable-sqlite-utf8 --with-zlib --with-zlib-dir --with-bz2 --with-gd --enable-gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-ttf --with-freetype-dir=/usr/local/include --with-iconv=/usr/local --with-curl=/usr/local --enable-track-vars --with-gettext --enable-trans-id --enable-ftp --enable-mbstring --with-openssl=/usr/local --with-dom
# make

At this point I get the error. And when I try 'make install' I get the exact same set of error messages. Just to be prudent, I performed these exact steps twice with the same outcome.

I really like what I see so far with this webserver. I am very interested in getting the standard version installed and later upgrade as my businesses grow.

Thank you for helping me so far, you have excellent customer service!

David
 

mistwang

LiteSpeed Staff
#5
You need to get rid of --with-apxs2=/usr/sbin/apxs , that's for building PHP as Apache2 module, you can only build one PHP SAPI module at a time.
 
#6
lol, okay I remember that now. When it comes down to it, I don't have a lot of experience with linux administration yet. But I'm giving it all I got.

Thank you for bearing with me.

David
 
Top