This is a discussion on Problem enabling DOM XML on Win32 within the PHP General forums, part of the PHP Programming Forums category; I'm running PHP 4.3.2 with Apache 2.0.46 on Windows XP Home. Intel P4 1.5GHz ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm running PHP 4.3.2 with Apache 2.0.46 on Windows XP Home. Intel P4
1.5GHz chip with plenty of memory. I'm trying to enable DOM XML functions in PHP and having a bit of trouble. Per the PHP manual's instructions, I've done the following: 1. Edited my php.ini file like so: [snip] ;Windows Extensions [snip] ;extension=php_gettext.dll ;extension=php_hyperwave.dll extension=php_iconv.dll <-- removed the ; ;extension=php_ifx.dll ;extension=php_iisfunc.dll 2. Installed iconv.dll (ver. 1.9.1.win32 downloaded from http://www.zlatkovic.com/libxml.en.html) in C:\Windows\SYSTEM32 3. Restarted Apache I created a test PHP file with the following code: <?php $storyfile = "story.xml"; $storydoc = domxml_open_file($storyfile); $storyroot = $storydoc->root(); $nodes = $storyroot->children(); printr($nodes); ?> to test everything out. PHP returned the following error: Fatal error: Call to undefined function: domxml_open_file() in C:\Apache2\htdocs\xmldom.php on line 5 Just to make sure I wasn't using the wrong function, I replaced domxml_open_file() with the deprecated xmldocfile() function, and got the same result. What am I missing here? -- -~=+ Dave Baker +=~- |
|
|||
|
Janwillem Borleffs wrote:
> Mr Geetar wrote: > >>1. Edited my php.ini file like so: >>[snip] >>;Windows Extensions >>[snip] >>;extension=php_gettext.dll >>;extension=php_hyperwave.dll >>extension=php_iconv.dll <-- removed the ; >>;extension=php_ifx.dll >>;extension=php_iisfunc.dll >> > > > It seems that you have missed out on the also required php_domxml.dll, which > should be bundled with php when you have downloaded the zip file. > > > JW > > > Oh dear God, it can't be that simple :) I can't believe I overlooked that extension completely. *loud sound of forehead thudding on desk* OK, problem solved. Back to work .. thanks! -- -~=+ Dave Baker +=~- |