PDA

View Full Version : php 4.4.7 + curl, what did I do wrong?


aww
05-10-2007, 12:13 AM
While I am still trying to figure out what I messed up with the old lsphp which I cannot get back online (http://litespeedtech.com/support/forum/showthread.php?t=1042) I thought I would post my attempt at php 4.4.7 and see if there is anything obvious as to why it seemed to build but threw errors on start:

first I pulled down what I thought I needed and unpacked
cd /
wget http://us3.php.net/get/php-4.4.7.tar.gz/from/us2.php.net/mirror
rm -rf php-4.4.7
tar zvxf php-4.4.7.tar.gz
cd php-4.4.7/sapi
wget http://www.litespeedtech.com/packages/lsapi/php-litespeed-3.1.tgz
tar zvxf php-litespeed-3.1.tgz
wget http://curl.haxx.se/download/curl-7.16.2.tar.gz
tar zvxf curl-7.16.2.tar.gz

then do the make
cd ..
touch ac*
./buildconf --force
./configure --with-litespeed --with-config-file-path=../php --with-mysql=/usr --with-zlib --with-zlib-dir=.. --with-gd --with-jpeg-dir=.. --with-png-dir=.. --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --with-openssl --with-curl
make
make install

Now that configure line is a hybrid of my old cpanel/apache/phpinfo result where I didn't need all that junk but wanted a few things './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--with-mm' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mm' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-wddx' '--with-xmlrpc' '--with-zip' '--with-zlib'


and litespeed's default phpinfo configure line
./configure --with-litespeed --with-config-file-path=../php --with-mysql=../mysql --with-zlib --with-zlib-dir=.. --with-gd --with-jpeg-dir=.. --with-png-dir=.. --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes

resulting in
./configure --with-litespeed --with-config-file-path=../php --with-mysql=/usr --with-zlib --with-zlib-dir=.. --with-gd --with-jpeg-dir=.. --with-png-dir=.. --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --with-openssl --with-curl

(basically I wanted to add curl and threw in openssl too, note how I changed the --with-mysql=/usr per the wiki instructions and used the same path the old apache phpinfo shows)

final steps

cd /opt/lsws/fcgi-bin/
mv lsphp lsphp.old
cp /php-4.4.7/sapi/litespeed/php lsphp

cd ..
fcgi-bin/lsphp -v <-- seems to pass, shows "(litespeed)"

copy old default lsws php.ini to proper new conf place per wiki
cp /opt/lsws/php/php.ini /opt/lsws/conf/php.ini

server lsws restart


and didn't work - lots of errors in the logs on startup

Anything obviously wrong?

aww
05-10-2007, 02:26 AM
Happy discovery, I was able to build it using the above steps by dropping down to 4.4.6

Runs without a hitch and with curl
And because I went to 4.4.6 I could re-use your phpa install

Oh and the step about the php.ini needing to be in conf is wrong, phpinfo says it's reading it from /php/php.ini

mistwang
05-10-2007, 08:37 PM
The problem with 4.4.7 could be mismatched eAccelerator, when you upgrade PHP, you have to disable opcode cache first.

We have made the eAccelerator for PHP 4.4.7 available.