mySQLi errors cause by a feed?

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
KurthBemis
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 18 Aug 2016, 17:17

mySQLi errors cause by a feed?

Postby KurthBemis » 18 Aug 2016, 17:39

I have an install that has been working without issue for...a long time. Yes, I keep the install current. Noticed this morning that my feeds were not updating. After running the update.php ( ./update.php --feeds --force-update) I get the following DB error. Any pointers?

Code: Select all

PHP Fatal error:  Query INSERT INTO ttrss_error_log
                                (errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES
                                (256, 'Query INSERT INTO ttrss_entries\n                                                        (title,\n                    guid,\n                                                  link,\n                                                 updated,\n                                   content,\n                                                       content_hash,\n                                                 no_orig_date,\n              date_updated,\n                                                  date_entered,\n                                                 comments,\n                  num_comments,\n                                                  plugin_data,\n                                                  lang,\n                      author)\n                                                VALUES\n                                                        (\'David Mohammed: budgie-remix 16.04.1 released\',\n                                                 \'SHA1:bf5cbdb1e55cc43586d11e060aed0e019be93748\',\n                                         \'https://xpressubuntu.wordpress.com/2016/08/02/budgie-remix-16-04-1-released/\',\n                                                      \'2016/08/02 22:21:50\',\n                                                    \'Actually we released last week but since this is my first Planet Ubuntu blog seems like an opportune momentXX Using the superb Budgie Desktop, we are pleased to follow the official Ubuntu and community flavour release cadence and offer up … Continue reading →\',\n                                                   \'0db96eae820d8bfb0c2bcb1703e3795734540c7c\',\n                                                 false,\n                                                      N in /srv/vhosts/kommun-it.org/ttrss.kommun-it.org/classes/db/mysqli.php on line 33
PHP Fatal error:  Query INSERT INTO ttrss_error_log
                                (errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES
                                (256, 'Query INSERT INTO ttrss_error_log\n                              (errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES\n                            (256, \'Query INSERT INTO ttrss_entries\\n                                                      (title,\\n   guid,\\n                                                 link,\\n                                                        updated,\\n                          content,\\n                                                      content_hash,\\n                                                        no_orig_date,\\n     date_updated,\\n                                                 date_entered,\\n                                                        comments,\\n         num_comments,\\n                                                 plugin_data,\\n                                                 lang,\\n                     author)\\n                                               VALUES\\n                                                       (\\\'David Mohammed: budgie-remix 16.04.1 released\\\',\\n                                                    \\\'SHA1:bf5cbdb1e55cc43586d11e060aed0e019be93748\\\',\\n                            \\\'https://xpressubuntu.wordpress.com/2016/08/02/budgie-remix-16-04-1-released/\\\',\\n                                                 \\\'2016/08/02 22:21:50\\\',\\n                                                       \\\'Actually we released last week but since this is my first Planet Ubuntu blog seems like an opportune momentXX Using the superb Budgie Desktop, we are pleased to follow the official U in /srv/vhosts/kommun-it.org/ttrss.kommun-it.org/classes/db/mysqli.php on line 33


I had to replace a "winking emojii" with XX in the above dump because phpbb won't let me post in in full. Here's a pastebin of the full dump: http://pastebin.com/YF8jUBDm

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: mySQLi errors cause by a feed?

Postby fox » 18 Aug 2016, 18:28

one pointer would be reading the rules and learning how to search

try to figure this out while on probation

project76
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 18 Jun 2016, 01:28

Re: mySQLi errors cause by a feed?

Postby project76 » 18 Aug 2016, 19:23

Hint: search for "error 256" on this board. There are only 2955 matches.

Something in the content wasn't properly escaped as it isn't UTF-8. This throws an error in update. The same content throws an error writing the error. The PDO escaping function doesn't remove Unicode nor does the TTRSS so bam.

In a perfect situation there would be checks to ensure UTF-8 databases are utf8_encoded() and decoded() as the data is put in and out, and prepared statements would be used to make error handling a bit cleaner.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: mySQLi errors cause by a feed?

Postby fox » 18 Aug 2016, 20:10

current trunk should have a workaround for this


Return to “Support”

Who is online

Users browsing this forum: Google [Bot] and 9 guests