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

Discussion in 'Install/Configuration' started by thunder, Sep 21, 2008.

  1. thunder

    thunder New Member

    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)

    Config Flags:


    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.

    Attached Files:

  2. mistwang

    mistwang LiteSpeed Staff

    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. thunder

    thunder New Member

    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
  4. mistwang

    mistwang LiteSpeed Staff

    Your need to reinstall zlib, since it is a 64bit Linux, it should use /usr/lib64/libz.* instead of /usr/lib/libz.*
  5. thunder

    thunder New Member

    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. ArcticWolf

    ArcticWolf New Member

    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.
  7. mistwang

    mistwang LiteSpeed Staff

    You need to install the devel packages, libxml2-devel

Share This Page