PDO is coming, here's what you need to know


#61

It works but I can’t login:
PHP message: PHP Warning: Failed login attempt for huy from x.x.x.x in /tt-rss/classes/handler/public.php on line 505


#62

Thanks @fox for the fever_api.php patch. Sync now seems to be working again, but I’m seeing this in the apache error log:

[Sat Dec 16 12:56:50.494304 2017] [php7:notice] [pid 78938] [client 127.0.0.1:54604] PHP Notice: Legacy connect requested to pgsql in /Library/Server/Web/Data/Sites/Default/tt-rss/classes/db.php on line 22

Something I need to worry about (or did wrong?). Or just because it’s old code?

Cheers


#63

the point is to nag everyone into updating their stuff to use PDO, otherwise this may be ignored


Fever Plugin Broken on 14 Dec 2017?
#64

Update was smooth and fast to commit 3d4ef6 on VPS with Ubuntu 16.04 and mysql.
No problems noticed.


#65

Since the update on the newest version I always get the following error:

pi@raspberrypi2:~ $ /var/www/html/tt-rss/update.php --feeds
PHP Notice: Legacy connect requested to mysql in /var/www/html/tt-rss/classes/db.php on line 22
[13:48:49/22728] Lock: update.lock
[13:48:49/22728] Scheduled 10 feeds to update…
[13:48:49/22728] Base feed: http://www.tagesschau.de/xml/rss2
[13:48:49/22728] => 2017-12-15 15:00:04, 8 1
PHP Fatal error: Uncaught exception ‘PDOException’ with message ‘There is no active transaction’ in /var/www/html/tt-rss/classes/rssutils.php:1159
Stack trace:
#0 /var/www/html/tt-rss/classes/rssutils.php(1159): PDO->commit()
#1 /var/www/html/tt-rss/classes/rssutils.php(185): RSSUtils::update_rss_feed(‘8’, true, false)
#2 /var/www/html/tt-rss/update.php(168): RSSUtils::update_daemon_common()
#3 {main}
thrown in /var/www/html/tt-rss/classes/rssutils.php on line 1159

Im running tiny tiny rss on a raspberry with mysql


#66

preferences - system - open log and looks for an actual SQL error which precedes this one

e: i’m 90% sure it’s a misbehaving plugin


#67

Many thanks, you were right. It was caused by the plugin 'api_newsplus` I added some years ago.


#68

Unfortunately now I’m getting a new error:

Uncaught exception ‘PDOException’ with message ‘There is no active transaction’ in /var/www/html/tt-rss/classes/rssutils.php:1159 Stack trace: #0 /var/www/html/tt-rss/classes/rssutils.php(1159): PDO->commit() #1 /var/www/html/tt-rss/classes/rssutils.php(185): RSSUtils::update_rss_feed(‘16’, true, false) #2 /var/www/html/tt-rss/update.php(168): RSSUtils::update_daemon_common() #3 {main} thrown
PDOStatement::execute(): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (ttrss.ttrss_tags, CONSTRAINT ttrss_tags_ibfk_1 FOREIGN KEY (post_int_id) REFERENCES ttrss_user_entries (int_id) ON DELETE CASCADE)

Is an update of the DB sheme required for the new version ? In contrast to other updates I didn’t see any.


#69

if this happens sometimes this could mean you run into concurrent feed updates, if its all the time then idk, could be a bug with tag inserting logic, could be something else

e: i’m yet to run into this problem on my instances but this has been reported before and its not pdo related


#70

Ok, and what can I do to solve the problem? I tried to delete all feeds and to create them again. But the same error appears again.


#71

try reading what i have wrote to you above


#72

Hello, sorry if my question is stupid :slight_smile:
I just did update and error log is flooded with this message.

E_USER_NOTICE (1024)	classes/db.php:22	Legacy connect requested to pgsql
1. classes/db.php(22): user_error(Legacy connect requested to pgsql, 1024)
2. classes/db.php(89): legacy_connect()
3. classes/pluginhost.php(93): get()
4. plugins/api_newsplus/init.php(36): get_dbh()
5. classes/pluginhost.php(207): init([PluginHost])
6. include/functions.php(1948): load(auth_internal, note, updater, api_newsplus, 1)
7. backend.php(51): init_plugins()
E_USER_NOTICE (1024)	classes/db.php:22	Legacy connect requested to pgsql

Does that mean, I should “nag” all creators of plugins I use? In my case api_newsplus? Thanks


#73

Yes, the plugins should be updated.


#74

It is a third-party plugin - I don’t think it will be updated. I have removed it - and newsplus also works without the update.


#75

When I try to update my feeds via a cron job, I get the following error:

PHP Fatal error:  Uncaught PDOException: There is no active transaction in /[...]/tt-rss/classes/rssutils.php:1159
Stack trace:
#0 /[...]/tt-rss/classes/rssutils.php(1159): PDO->commit()
#1 /[...]/tt-rss/classes/rssutils.php(185): RSSUtils::update_rss_feed('67', true, false)
#2 /[...]tt-rss/update.php(168): RSSUtils::update_daemon_common()
#3 {main}

In the error log there is this additional entry:
PDOStatement::execute(): SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: 'NOW()' for column 'last_read' at row 1

It seems to an SQL error. My schema is already updated:

update.php --update-schema

Lock: update.lock
checking for updates (mysql)...
update not required.

I’m on commit commit 6fb5f17be69f9ff3a0e1379e64a3c7bd71ab3271 and use the following plugins:
define('PLUGINS', 'auth_internal, updater, api_newsplus');

Does anyone know how to solve this?


#76

post the stack trace for the NOW() error; also you will likely need to either update or remove the newsplus plugin (search the forum this has been just discussed)

e: also it’s probably this https://git.tt-rss.org/git/tt-rss/commit/d4c05d0be2c0e865d06b24d334afeeeebadcfd58


#77

In my case it was caused by the newsplus plugin and I had to reset the database.


#78

yeah i need to take a look at the tags, maybe tomorrow


#79

Thats all I get from the error log:

PDOStatement::execute(): SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: 'NOW()' for column 'last_read' at row 1
1. classes/rssutils.php(959): execute(Array)
2. classes/rssutils.php(185): update_rss_feed(67, 1, )
3. update.php(168): update_daemon_common()

I removed the newsplus plugin and now the update fetches some feeds and then stops with this error:

PDOStatement::execute(): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`ttdb`.`ttrss_tags`, CONSTRAINT `ttrss_tags_ibfk_1` FOREIGN KEY (`post_int_id`) REFERENCES `ttrss_user_entries` (`int_id`) ON DELETE CASCADE)
1. classes/rssutils.php(1139): execute(Array)
2. classes/rssutils.php(185): update_rss_feed(37, 1, )
3. update.php(168): update_daemon_common()

#80

first one should be fixed now. have you updated to latest trunk?

post feed url with the tag problems (unless it’s all feeds)