compiling php with GD and dom

#1
Hello Everyone,

I know that this is really a php issue, but I'm just wondering if anyone else has run into this. We currently run cPanel V11 (release tree) on CentOS 4.5. We're trying to compile PHP with the LSAPI using the following options (and a bunch more):

--with-dom --with-dom-xslt --with-dom-exslt --with-gd

The with-dom-xslt / with-dom-exslt seem to conflict with the with-gd option when we compile by hand. If we compile with easyapache it somehow works. We've grabbed all the compile options off a phpinfo() page, so I know that is right.

Any help/suggestions would be appreciated.

TIA,

Sam
 
#3
Code:
checking for jpeg_read_header in -ljpeg... no
configure: error: Problem with libjpeg.(a|so). Please check config.log for more information.
but that is "really" not the error. When you look at config.log you see:

Code:
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libxslt.so: undefined reference to `xmlModuleClose'
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libxslt.so: undefined reference to `xmlModuleOpen'
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libxslt.so: undefined reference to `xmlModuleSymbol'
collect2: ld returned 1 exit status
Which are what is really causing the problem. libxslt exists both in /usr/lib/ and /home/cpapachebuild/buildapache/libxslt-1.1.16/libxslt/.libs/. I "guessing" that the easyapache build is looking at the cPanel version of the lib, but both appear to be the same version etc.

Sam
 
#4
As i thought this should be.

Ok, we had exact problems with all our CentOs 4.x servers. We fixed only with those steps:

- run /scripts/easyapache and check 7
- check the latest PHPx and everything you need
- wait until this is done

Now recompile again PHPx in you LSWS dir and everything should compile ok without any errors. Even you can have PHP 4 & 5 on the same Cpanel without any worries.

For PHP4
./configure '--prefix=/usr/local/php4' '--with-litespeed' '--with-config-file-path=/opt/lsws/php' '--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' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--enable-memory-limit' '--with-mhash' '--enable-magic-quotes' '--with-mm' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-wddx' '--with-xmlrpc' '--with-zlib'
For PHP5:

./configure '--prefix=/usr/local/php5' '--with-litespeed' '--with-config-file-path=/opt/lsws/php5' '--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-gettext' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--enable-memory-limit' '--with-mhash' '--enable-magic-quotes' '--with-mm' '--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-zlib'
Now we got all Cpanel servers with Litespeed and we just LOVE IT !

Regards.
 
#5
OK, I'm slightly confused:

- As far as I can tell, cPanel builds it's files under /home and a manual php build is not going to look there.

- Relying on cPanel / easyapache fixed/custom built libraries may not be a great long term solution.

Sam
 
#6
OK, I'm slightly confused:

- As far as I can tell, cPanel builds it's files under /home and a manual php build is not going to look there.
- Relying on cPanel / easyapache fixed/custom built libraries may not be a great long term solution.

Sam
I'm not talking about cpanel build. You dont need to reinstall Cpanel!

You need only to recompile the whole Apache with all PHP directives.After that you need on compile PHP on LSWS.

And yes, to start recompile Apache you need to run /scripts/easyapache and look at the choices OR you can go to WHM -> Apache Update and hit "load previous config" to get selected what is already installed.

This is the only way that we fixed our servers. We searched 1 week for fix and only this way was success.

I hope this will fix you server too :)

Regards.

dbMG
 
#7
It did fix it. Easyapache compiles numerous programs into /usr (including xslt) so the easyapache build recompiled those libraries and fixed it up.

Sam
 
Top