#1006956 tt-rss spits a lot of php warnings

#1006956#5
Date:
2022-03-09 07:02:10 UTC
From:
To:
tt-rss spits a lot of logs. In 8 hours it did that:

% journalctl -S today | grep -c tt-rss
36715

Logs are all php warnings like this:

mars 09 07:56:17 xxx php[478978]: [tt-rss] E_WARNING (2)
(classes/urlhelper.php:99) Undefined array key "port"
mars 09 07:56:17 xxx php[478978]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:63) Undefined global variable $_SESSION
mars 09 07:56:17 xxx php[478978]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:63) Trying to access array offset on value of type
null
mars 09 07:56:17 xxx php[478978]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:86) Undefined global variable $_SESSION
mars 09 07:56:17 xxx php[478978]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:86) Trying to access array offset on value of type
null
mars 09 07:56:17 xxx php[478978]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:63) Undefined global variable $_SESSION
mars 09 07:56:17 xxx php[478978]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:63) Trying to access array offset on value of type
null
mars 09 07:56:17 xxx php[478978]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:86) Undefined global variable $_SESSION
mars 09 07:56:17 xxx php[478978]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:86) Trying to access array offset on value of type
null
mars 09 07:56:17 xxx php[478978]: [tt-rss] E_DEPRECATED (8192)
(classes/rssutils.php:703) strip_tags(): Passing null to parameter #1
($string) of type string is deprecated
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/userhelper.php:78) Undefined global variable $_SESSION
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/userhelper.php:78) Trying to access array offset on value of
type null
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:11) Undefined global variable $_SESSION
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:11) Trying to access array offset on value of type
null
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:63) Undefined global variable $_SESSION
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:63) Trying to access array offset on value of type
null
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:86) Undefined global variable $_SESSION
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/db/prefs.php:86) Trying to access array offset on value of type
null
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:143) Undefined array key 2
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx update.php[478973]: PHP Warning:  Array to string
conversion in /usr/share/tt-rss/www/include/errorhandler.php on line 24
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:147) Undefined array key 50
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:143) Undefined array key 3
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:147) Undefined array key 50
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:143) Undefined array key 20
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:147) Undefined array key 50
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:143) Undefined array key 21
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:147) Undefined array key 50
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:143) Undefined array key 1
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:147) Undefined array key 50
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:143) Undefined array key 41
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(classes/pluginhost.php:147) Undefined array key 50
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_WARNING (2)
(update.php:287) Undefined variable $op
mars 09 07:56:17 xxx php[478973]: [tt-rss] E_DEPRECATED (8192)
(classes/debug.php:41) Function strftime() is deprecated

#1006956#10
Date:
2023-11-03 10:21:40 UTC
From:
To:
severity 1006956 important
thanks

Are there any news on this? In just one week:

journalctl -S 2023-10-27 _SYSTEMD_UNIT=tt-rss.service | wc -l
1057249

And logs that are not about garbage:

journalctl -S 2023-10-27 _SYSTEMD_UNIT=tt-rss.service | grep -iv warning
| grep -iv deprecated | wc -l
1051

So a whopping 99.9% of tt-rss logs are absolute garbage that just point
at badly written code.
The best thing would be of course to fix those deprecation warnings, but
at least we could hide them to avoid consuming disk space with
completely useless stuff.

#1006956#17
Date:
2025-04-15 09:29:17 UTC
From:
To:
On Fri, 3 Nov 2023 11:21:40 +0100 VA <bugs@indigo.re> wrote:> Are there
any news on this? In just one week:
In our case, what I ended up doing is to filter all of these logs out
using the LogFilterPatterns [1] of systemd v253+ (installed from
bookworm-backports), by adding a systemd override file:

diff --git a/systemd/system/tt-rss.service.d/override.conf
b/systemd/system/tt-rss.service.d/override.conf
new file mode 100644
index 00000000..9f4f6479
--- /dev/null
+++ b/systemd/system/tt-rss.service.d/override.conf
@@ -0,0 +1,2 @@
+[Service]
+LogFilterPatterns=~E_WARNING|E_DEPRECATED|E_NOTICE|PHP Warning


[1]:
https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#LogFilterPatterns=