Posted by & filed under Developer Blog.

There are many examples of how to parse through an XML document using PHP out on the web by doing a quick google search. I was having problems because even while following all of those examples, I was getting the following error:

PHP Fatal error: Call to undefined function: xml_parser_create()

Everywhere I searched said “you need to recompile PHP and use –with-xml and it will get rid of this error. Well, I didn’t compile PHP in the first place, I installed Apache2 as an RPM in Mandrake and the PHP module (apache-mod_php) to go with it. I couldn’t find anywhere that told me how to add XML support to PHP in that case.

After many hours of searching, I finally discovered that you need to also install the php-xml RPM and the problem will go away. Seems easy enough now, but I was really having a difficult time finding the answer to this.