Well, DOM is included in the php 5 core, so if you're running php 5.x, you've got DOM. If you're running php4, you need to get the PECL extension DOMXML. If you didn't configure php with the "--with-dom[=DIR]" or "--with-dom-xslt[=DIR]" then you don't have it, and need to reconfigure php (should be easy).
Create a new php file called info.php with this as it's only content:
<?php
phpinfo();Now, save it, and upload it to your server. THen from the command-line, go and get the php 4 source you're using (or better yet, get the php5 source
). Extract it and enter the folder. Then type:
./configure --help
That will list every single command you can run. Just scroll thorugh and make sure that what you see in the php info output in the browser is available in that version of PHP (I'm pretty-sure everything is).
So, once you've confirmed everythin in the phpinfo "configure line" is there, then you can just copy that entire blob of text, set it to the command line, add "--with-dom" and/or "--with-dom-xslt" (specifying the path to libxslt using "=/some/path" after the --with parameter if libxslt isn't in your path). Then run it, then make, make test, make install and you're done!
Now, things to note:
1.) I'm not going to guarantee that will work 100%
2.) You need to back-up your php.ini
3.) You might want to let someone more technically saavy do this for you if you can (i.e. a hosting company)
So, if you're on shared hosting, you're SOL unless you can get them to enable DOM in php4 (otherwise, it's avaiable in PHP 5). If you're on a VPS or dedicated and you have shell access, you should be able to do this.