Skip to main content

iPhone WordPress App Error: NSXMLParserErrorDomain error 5 [Fixed]

By December 5, 2009How To

When I first tried to add my blog to the iPhone WordPress app, it kept coming up with this error: NSXMLParserErrorDomain error 5. I did a bit of research on the WordPress for iPhone Forums but everything I tried did not help.

Finally, I used this XMLRPC Debugger to connect to my WordPress site’s XMLRPC daemon to see what the issue was. The first time I tried it, I was presented with this error:
HTTP/1.1 200 OK
Date: Sat, 05 Dec 2009 16:57:38 GMT
Server: Apache
X-Powered-By: PHP/5.2.11-pl1-gentoo
Content-Length: 169
Connection: close
Content-Type: text/html
Fatal error: Call to undefined function xml_parser_create() in /var/www/ on line 165
HEADER: date: Sat, 05 Dec 2009 16:57:38 GMT
HEADER: server: Apache
HEADER: x-powered-by: PHP/5.2.11-pl1-gentoo
HEADER: content-length: 169
HEADER: connection: close
HEADER: content-type: text/html
XML error: junk after document element at line 2, column 0

After reviewing the error message, I guessed that this had something to do with PHP not being installed with XML Support. Upon running phpinfo(), I was able to determine that this was indeed the case. In my case, the fix for this was to add the XML use flag to my Gentoo /etc/make.conf. For others who are not using Gentoo, your best bet will be to recompile PHP with XML enabled (Google is probably your friend here).

Once the recompile of PHP completed, I restarted Apache (the webserver) and used the XMLRPC Debugger again. This time it came back with a valid response. So I then attempted to connect to my WordPress blog using the iPhone application and… you guessed it… it worked!

So, now I can edit and update my blog from my iPhone. How cool!

For more information on my struggle with this error, see my posting on the WordPress for iPhone Forums

Leave a Reply