PHP install for Litespeed

netjess

Active Member
#1
I am having real time trying to get PHP installed with lsws.
I keep getting erros like ac_fn_c_try_link: not found

I have read http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:php:lsapi:troubleshoot

and several other threads regarding the PHP install. This is on a barebones install. I installed the OS from start, Ubuntu 10.4.2. Installed MySQL, and Litespeed. I have a application that errors stating that it requires PHP 5.2 or greater so I try to compile via Litespeed admin interface and fight with many errors. I try from cli as per the above instructions and I still cannot get it to install.
I am running this via sudo.
Final line of install failure reads:
./configure: 12050: checking for dirent.h that defines DIR... : not found
eval: 1: Bad substitution

Thanks for any help.
 

netjess

Active Member
#2
PHP Package

Could I get this to work using 'sudo apt-get install php5' or will that not get PHP to work on the Litespeed web server?
 

netjess

Active Member
#4
PHP install

I am trying to build a dev machine to be installed as close as possible to a production machine that someone else at our hosting site built.

here are the istructions that I have.

The first thing is getting the server with the correct modules. Running

apt-get install autotools-dev comerr-dev freetds-dev libaspell-dev libbsd-dev libbz2-dev libc6-dev libcurl4-openssl-dev libdb-dev libdb4.8-dev libedit-dev libenchant-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libgcrypt11-dev libgd2-xpm-dev libglib2.0-dev libgmp3-dev libgpg-error-dev libice-dev libicu-dev libidn11-dev libjpeg62-dev libkrb5-dev libldap2-dev libltdl-dev libmcrypt-dev libmhash-dev libmysqlclient-dev libncurses5-dev libpam0g-dev libpcre3-dev libpng12-dev libpq-dev libpspell-dev libpthread-stubs0-dev librecode-dev libsasl2-dev libsm-dev libsnmp-dev libsqlite0-dev libssh2-1-dev libsqlite3-dev libssl-dev libstdc++6-4.4-dev libt1-dev libtidy-dev libwrap0-dev libx11-dev libxau-dev libxaw7-dev libxcb1-dev libxdmcp-dev libxext-dev libxml2-dev libxmltok1-dev libxmu-dev libxpm-dev libxslt1-dev libxt-dev

will get the server up to the point needed. Then running apt-get upgrade

Building php will be done in litespeed with the options below.

'--prefix=/usr/local/lsws/lsphp5' '--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-mysql' '--with-mcrypt' '--with-curl' '--with-freetype-dir=/usr/include' '--with-png-dir=/usr/include' '--with-xpm-dir=/usr/include' '--enable-gd-native-ttf' '--with-t1lib=/usr/include' '--with-jpeg-dir=/usr/include' '--with-litespeed' '--with-pdo-mysql' '--enable-soap' '--with-openssl' '--enable-suhosin'

After that point, running

/usr/local/lsws/lsphp5/bin/pecl install -f ssh2

Then uncomment extension=ssh2.so from within /usr/local/lsws/lsphp5/lib/php.ini
 

netjess

Active Member
#5
PHP Install comments.

I have updated everything possible and I had to manually install the Suhosin patch.

compiling through lsws admin interface does not work. it complains of the erros that I posted above that it look like file not found errors but I have not been able to find anywhere to explicitly give it a good path(s).
 

webizen

Well-Known Member
#6
run 'php -i' on your production server and paste the portion of 'Configure Command =>' here. the compile option you used is the default that comes with LSWS which may not suit for your need.
 

netjess

Active Member
#9
PHP info

First, thanks for helping.

php -i did not return any output 'Configure Command=>'

It does return this though:
phpinfo()
PHP Version => 5.3.2-1ubuntu4.5

So it looks like I need to install a higher version anyway to make sure my dev box matches my prod.
I had actually started at the highest offered (5.3.5) in the admin interface but that was full of compile issues with incorrect URLs for downloads and such.
I tried a number of versions just trying to get something above 5.2 to compile but I am not sure if I tried 5.3.2 in particular. I am going to try that and see if I can get it to go.

Thanks again. I'll let you know if it works.
 
Top