XML & Web Services

How-to install DOMXML and XML-RPC for PHP by recompiling PHP4 and Apache on your CPANEL server

With the recent surge of tools using web service APIs like the Yahoo APIs in PHP such as

it suddenly became necessary for several web hosts (including me with my own dedicated servers) to provide the PHP domxml extension in their setup.

I noticed that the standard CPANEL setup didn't provide an option for adding DOMXML to the standard PHP recompilation and decided to dig into the configure/make config of CPANEL9/10.x and PHP4.3.9/10 …

Here are my steps for getting DOMXML and XML-RPC (another usefull thing) into your standard PHP distro… all steps without ANY warranties… get a paid administrator if you don't have the guts.

find you normal CPANEL/Apache directory that is left from the last Apache upgrade in CPANEL

it could be here

Quote:

cd /home/cpapachebuild/buildapache/php-4.3.10

of course the PHP version no could be different on your system.

in that directory you find a file called config.status which is generated by the previous compile procedure… it contains a commented line starting similar to this:

Quote:

  1. ./configure —with-apxs=/usr/local/apache/bin/apxs —with-xml —enable-bcmath —enable-calendar —with-curl —enable-ftp —with-gd —with-jpeg-dir=/usr/local —with-png-dir=/usr —with-xpm-dir=/usr/X11R6 —enable-magic-quotes —with-mysql —enable-discard-path —with-pear —enable-sockets —enable-track-vars —with-ttf —with-freetype-dir=/usr —enable-gd-native-ttf —enable -versioning —with-zlib

This is actually the last configure commandline used for your apache build… I think you could get it from phpinfo() as well, but this way we can be sure… copy/paste that line and save for later…

Then type

Quote:

make clean

to cleanup old build objects and other crap that could interfere with your next steps…

Then we use the last command line and simply add the two essential modifieds

  • —with-xmlrpc : that was easy – XMLRPC module … (you need libxml rpms installed on your webhost as well, just add that with the Cpanel RPM installer!)
  • —with-dom : this is for the DOMXML support… I searched around for some time to make sure this is REALLY the DOMXML library and not some XLST crap that is known to kill your Apache stability

type:

Quote:

./configure —with-apxs=/usr/local/apache/bin/apxs —with-xml —enable-bcmath —enable-calen

dar —with-curl —enable-ftp —with-gd —with-jpeg-dir=/usr/local —with-png-dir=/usr —with-xp

m-dir=/usr/X11R6 —enable-magic-quotes —with-mysql —enable-discard-path —with-pear —enable-

sockets —enable-track-vars —with-ttf —with-freetype-dir=/usr —enable-gd-native-ttf —enable

-versioning —with-zlib —with-xmlrpc —with-dom

This runs for ages, checks all libraries, dependencies etc.etc.

Then to really build the Apache PHP modules in your build directories

Quote:

make

To install them with Apache type

Quote:

make install

and finally restart your Apache with

Quote:

httpd restart

You should now have DOMXML and XMLRPC in your Apache distribution installed… phpinfo() should tell you so, as well as this commandline…

Average rating
(1 vote)

Similar entries

  • Tidy is a PHP extension for the Tidy HTML clean and repair utility which allows you to not only clean and otherwise manipulate HTML documents, but also traverse the document tree. It’s performance is great and you have a ton of features to make your html code or smarty output html compliant.

    Read how to install it in 5 minutes – regardless if you have a Linux or Windows box…

  • DomainKeys implementation really sucky

  • Open Source Java

  • I finally got on-site caching enabled, using the MT-plugin simply called “Cache”... Example here: my kingdom for a local cache of ORF.AT, local TV station. I just wonder to make it possible to enable site-search in the cached pages aswell…...

  • Running public web applications may seem like playing Russian roulette. Although achieving robust security on the Web is possible in theory, there's always a weak link in real life. It only takes one slip of the code to allow attackers…