How to --enable-dom without recompiling PHP?

Just install the package named php-xml, which provides the php-dom support.

You can find a list of downloads at http://rpm.pbone.net/index.php3/stat/4/idpl/10503222/com/php-xml-5.2.6-5.i386.rpm.html

Make sure to adjust configs in order to actually load the modules:

/etc/php.d/dom.ini
/etc/php.d/xmlreader.ini
/etc/php.d/xmlwriter.ini
/etc/php.d/xsl.ini

and restart apache.


You cannot - these are compile-time options.

Unless you find another pre-compiled PHP distribution that is compatible with your setup (which you don't detail in your question).

Unless of course the functions that you are looking for are implemented in other ways too, say a set of functions in a php script file that you can include() into your scripts.