tags:

views:

17

answers:

1

I have just moved my code over to a new server (running on Apache 2.2.3), and PHP's DOM functions are now returning "Fatal error: Class 'DOMDocument' not found".

I did some research and it appears that the installation I am now on does not have PHP's DOM functions enabled.

I need to enable these functions, so what is the quickest way to go about this? Is it doable from a configuration file or will it require installation of extensions?

Thanks!

A: 

Is PHP compiled with --disable-dom (check your phpinfo())? If PHP is compiled without DOM support you'll have to recompile PHP or find a precompiled binary which suits your needs. The manual clearly states that there are no installation needed in PHP5 and no configuration options.

If you are for some reason running PHP 4, you should really upgrade to PHP 5. I you only want to enable the DOM XML extension in PHP4, read this manual page

Emil Vikström
Hi, and thank you for your answer.I managed to sort this problem out; PHP was indeed compiled without DOM support. Thankfully though a recompile was not needed, and I used yum to install "php-xml". This fixed my problem.