XML DOM Setup with PHP

Hi,

I am using PHP version 4.4.0.0 and apache2 version 2.0.54.

I am trying to install the xml dom support but am not having any luck.

Following the instructions on php.net I have done the following:

1. Set the extensions directory in php.ini extension_dir =
“C:/php/extensions”
2. Loaded the xmldom module by uncommenting the line in php.ini
extension=php_domxml.dll
3. Copied iconv.dll into C:\Windows\System32 so that it can be found
on my system’s path
4. Restarted my Apache Server

phpinfo() shows that xmldom support is enabled

domxml
DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20611
HTML Support enabled
XPath Support enabled
XPointer Support enabled
DOM/XSLT enabled
libxslt Version 1.1.7
libxslt compiled against libxml Version 2.6.11

The code that is throwing the error is as follows:

$dom = new DOMDocument();

I am getting the error message:

PHP Warning: domdocument() expects at least 1 parameter, 0 given in
F:\web\popup\test.php on line 11

Can anyone help point out any other setup that I may have missed?

Thanks,
Fiona

Source : http://www.thescripts.com/forum/thread171292.html

Leave a Reply

You must be logged in to post a comment.