Can't get PHP (5.2.6) to compile...

#1
Howdy...

I'll get over my embarrassment, and ask for a hand. :)

I'm installing LS fresh on 3 new boxes, which are identical. For the life of me, I can't get PHP 5.2.6 to compile on two of them. Whether through the web console, or command line, it just won't build.

The first box had a few minor hiccups, but nothing serious, and was up and rolling with a couple yum packages.

The other two, however, appear to be throwing fits with libxml2. Yes, I have both libxml2 and libxml2-devel, and have even removed and reinstalled them a few times.

Any advice? Something I'm missing?

OS: RHEL5 (64-bit)
LS: 3.3.18 (community)

Build output (web console, attached in full)

Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed. Please check the config.log for details.
Config Flags:

--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 --enable-simplexml --with-libdir=lib64 --with-mcrypt

I'm sure it's something silly, but after looking at it for the past 3+ hours, it's probably right in front of my face and I'm just missing it.

Thanks.
 

Attachments

mistwang

LiteSpeed Staff
#2
You really need to look into the config.log to find out why libxml test failed.

Is that possible that the problem is related to "--enable-simplexml"? Just a wild guess.
 
#3
Even without simplexml, it fails in the same manner. Including a default configuration install.

Samples from config.log, where xml is mentioned (skipping the line with the initial configure flags):

INCLUDES=' -I/usr/include/libxml2'

LIBS='-lresolv -lm -ldl -lnsl -lxml2 -lz -lm'

configure:27964: checking whether to enable LIBXML support
configure:28002: result: yes
configure:28012: checking libxml2 install dir
configure:28030: result: no
configure:28042: checking for xml2-config path
configure:28056: result: /usr/bin/xml2-config
configure:28200: checking whether libxml build works
configure:28232: gcc -o conftest -g -O2 conftest.c

-lresolv -lm -ldl -lnsl -lxml2 -lz -lm >&5
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
configure:28235: $? = 1
configure: program exited with status 1
 
#5
It ended up taking a remove/install of zlib-devel, and the following flags in the web console:

--prefix=/usr/local/lsws/lsphp5 --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 --enable-simplexml --with-libdir=lib64 --with-mcrypt

Beats me, but it compiled and is working happily on 2 out of 3 web servers.
 
#6
Hello I cant get this to compile either
error i am getting is:
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.

I have installed libxml2 and its still not working.
Any help please.
 
Top