lsphp(5) compilation error

Discussion in 'PHP' started by epieters, Jul 4, 2007.

  1. epieters

    epieters New Member

    I'm trying to compile lsphp (php 5.2.3) om WestHost's VPS.

    I'm following the instructions from

    I downloaded the patched PHP package from

    after ./configure I run ./make but get immediately 10's of compilation errors.
    It starts with:

    /home/ictfbe/php-5.2.3/ext/libxml/libxml.c:38:27: libxml/parser.h: No such file or directory
    /home/ictfbe/php-5.2.3/ext/libxml/libxml.c:39:36: libxml/parserInternals.h: No such file or directory
    /home/ictfbe/php-5.2.3/ext/libxml/libxml.c:40:25: libxml/tree.h: No such file or directory
    /home/ictfbe/php-5.2.3/ext/libxml/libxml.c:41:24: libxml/uri.h: No such file or directory
    /home/ictfbe/php-5.2.3/ext/libxml/libxml.c:42:29: libxml/xmlerror.h: No such file or directory
    /home/ictfbe/php-5.2.3/ext/libxml/libxml.c:43:28: libxml/xmlsave.h: No such file or directory
    In file included from /home/ictfbe/php-5.2.3/ext/libxml/libxml.c:48:
    /home/ictfbe/php-5.2.3/ext/libxml/php_libxml.h:64: error: syntax error before "xmlNodePtr"

    The strange thing is that xml2 is installed and ./configure does find /usr/local/bin/xml2-config

    Any pointers on how to get to the next step?
    Alternatively a pre-compiled lsphp (5.2.x) (on Linux 2.6.9-42.0.3.ELsmp) would do the trick as well :)

  2. mistwang

    mistwang LiteSpeed Staff

    You can try to locate the required header files under /usr/local/ or /usr/local/include, if they are not available you need to reinstall libxml.
  3. epieters

    epieters New Member

    I've located the header files in /usr/local/include/libxml2.

    So, i'm passing --includedir=/usr/local/include/libxml2, but that doesn't change the result.

    Which flags should I pass to ./configure in order to force /usr/local/include/libxml2 to be included and passed to gcc as -I?

    Reading INSTALL didn't help me a lot.


  4. epieters

    epieters New Member

    Forgot to mention it, but in the meantime I just edited the Makefil and added an extra -I in the INCLUDES.

    Its compiling now, but the correct way is to do this thru ./configure and not touching the Makefile after ./configure

    -- Eric.

Share This Page