compiling php with GD and dom

Discussion in 'PHP' started by pitabread55, Jul 3, 2007.

  1. pitabread55

    pitabread55 Member

    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.


  2. dbMG

    dbMG Member

    What errors do you get when you try recompile ?
  3. pitabread55

    pitabread55 Member

    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:

    /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../ undefined reference to `xmlModuleClose'
    /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../ undefined reference to `xmlModuleOpen'
    /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../ 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.

  4. dbMG

    dbMG Member

    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
    For PHP5:

    Now we got all Cpanel servers with Litespeed and we just LOVE IT !

  5. pitabread55

    pitabread55 Member

    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.

  6. dbMG

    dbMG Member

    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 :)


  7. pitabread55

    pitabread55 Member

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


Share This Page