I noticed that I had multiple PHP errors in my watchdog table in a row, coming from the Blog Reactions module. The associated url that it happened on was 'http://blog.davereid.net/content/treasurydirect-too-much-security'. From what I can tell, the simple_xml_load_string got fed an actual HTML page instead of XML in the blog_reactions_fetch_bloglines() function. Maybe a check for $request->code == '200' should be added. I'll keep an eye on this and see if I can duplicate this.
Errors:
simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Space required after the Public Identifier in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: ^ in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : SystemLiteral " or ' expected in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: ^ in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : SYSTEM or PUBLIC, the URI is missing in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: ^ in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: Entity: line 17: parser error : Opening and ending tag mismatch: hr line 15 and body in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: </body></html> in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: ^ in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: Entity: line 17: parser error : Opening and ending tag mismatch: body line 4 and html in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: </body></html> in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: ^ in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: Entity: line 18: parser error : Premature end of data in tag html line 2 in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
simplexml_load_string() [function.simplexml-load-string]: ^ in /home/.katona/davereid20/drupal-6/sites/all/modules/blog_reactions/blog_reactions.module on line 333.
Comments
Comment #1
rene_w commentedI also get tons of these in my log file (running blog reactions 6.x-1.6). A few examples:
Comment #2
bjacob commentedI think the problem occurs as soon as Technorati doesn't return a result. In my case it happened looking up http://feeds.technorati.com/search/http://bee5.de. If you search for it manually you'll get a result. But the cron didn't get the same result. I've added the following line to blog_reactions_fetch_technorati() right after
The returned HTML code looks like this (just a small snippet):
As you can see something is returned by Technorati but nothing useful. So IMHO we have to check $response->data before we use simplexml_load_string(). I've seen that the title tag is empty...
Comment #3
bjacob commentedTemporarily you can hide the PHP error by adding an @ to the following line:
Maybe we can add another condition to check if $xml is an object or not FALSE...
Comment #4
sanduhrsFixed that issue in 5-dev, 6-dev.
Thanks.
Comment #5
sanduhrsstatus update.
Comment #7
slnm commentedYou may benefit from reading this comment:
http://drupal.org/node/609836#comment-2183360