RIP config.php hello classes/config.php

By bad, mistyped couple of options. TT-RSS seems to be up and running.

yeah, i’ll add the ;. forgot, i guess.

Hah! I intentionally removed the ;
now it works

On my dev system i updated to latest v21.02-46e650622, cleared all config.php entries and created only the neccessary new ones:

putenv(‘TTRSS_SELF_URL_PATH=’);
putenv(‘TTRSS_DB_HOST=’);
putenv(‘TTRSS_DB_USER=’);
putenv(‘TTRSS_DB_NAME=’);
putenv(‘TTRSS_DB_PASS=’);

works.

But in the latest hours i see a lot of warnings in my log:

E_WARNING (2) classes/rssutils.php:1705 chmod(): Operation not permitted 1. classes/rssutils.php(1705): chmod(feed-icons/257.ico, 420) 2. classes/rssutils.php(601): check_feed_favicon(https://www.reddit.com/r/usefulscripts/new/, 257) 3. update.php(238): update_rss_feed(257, 1) 11:35
E_WARNING (2) classes/rssutils.php:1705 chmod(): Operation not permitted 1. classes/rssutils.php(1705): chmod(feed-icons/240.ico, 420) 2. classes/rssutils.php(601): check_feed_favicon(https://www.guru3d.com, 240) 3. update.php(238): update_rss_feed(240, 1)

Even when i chmod 777 complete html folder (for testing) the errors exist.

After some panic and “what am I doing here?” soul searching, it worked fine.

Note, I tried to set putenv("TTRSS_SINGLE_USER_MODE=false") and that turned it on… Thankfully, just omitting it made it work with my users. So, yay.

sed -i -e "s/define('\(.*\)',\s*'\(.*\)')\;/putenv('TTRSS_\1=\2')\;/g" -e "s/define('\(.*\)',\s*\([0-9]*\))\;/putenv('TTRSS_\1=\2')\;/g" -e "s/define('\(.*\)',\s*\(true\))\;/putenv('TTRSS_\1=\2')\;/g" -e "s/define('\(.*\)',\s*\(false\))\;/putenv('TTRSS_\1=\2')\;/g" config.php

Why change the config manually when you can use the magic of regular expressions?

(Don’t forget to backup the config file before running this)

Thank you! I really needed that today. It’s awesome!!!

You sure⸮

Glad to see i’m not the only idiot who was running a cron job to automatically pull new git changes.

I’ve followed the instructions others have left, and my instance of ttrss is running again. But at a snails pace. It takes about 1 minute between clicking something and the instance to respond. The server has nearly no load on it.

Anyone else experienced this?

No errors popping up outside of the ttrss console logs. like @m4ntic0r posted, and even those don’t really explain it.

Oh, I did that pull manually and then went … Whoops, need to fix that.

I changed my config.php and tt-rss is running but it seems to have an empty database. All my settings and opml are missing. Only error I see logged is:

E_WARNING (2) lib/jimIcon.php:107 imagecreatefromstring(): Data is not in a recognized format.

I ran the sed script above. Any ideas anyone on what may be wrong.

my guess would be you managed to enable SINGLE_USER_MODE after migrating a boolean with “false”, see above for details (value should be blank).

in general i suggest not adding any variables you haven’t consciously modified from the default.

did you login/are you able to logout? I was in your situation and had the same issue, untill I disabled

putenv('TTRSS_SINGLE_USER_MODE=false');

in config.php.
I was logged out forcefully and was able to login in again. All the feeds and articled where there. Hope it helps.

That is in my config. I had some issues in editing but this was in all versions. But thanks for the ideas.

just scroll up a bit and you’ll see the correct syntax.

https://git.tt-rss.org/fox/tt-rss/wiki/GlobalConfig#migrating-from-old-style-config-php

e: i’ve also updated the docker-specific wiki with similar instructions here:

https://git.tt-rss.org/fox/ttrss-docker-compose/wiki/Home#how-do-i-set-global-configuration-options

thank you Fox!!! think this weekend i’ll have to look into switching to docker.

I dont really understand it… the errors “chmod(): Operation not permitted” are gone… nothing really changed…

i had a daily autoupdate via git too, but in the last time and because of a lot of changes… AND docker… i created two lxd containers. one stable system without updates, one dev system.

i work a lot with lxd containers on my vps. have ~20 running. perhaps i have to try and run docker inside lxd, should be possible with nested container configuration.

feed icons are updated once in a while, you’ll see it again unless you fix the actual problem (likely wrong ownership preventing the chmod())

this isn’t really related to the thread discussion it’s just that this favicon PR has been merged recently

https://git.tt-rss.org/fox/tt-rss/pulls/6

this adds a rudimentary type system for config class which should deal with the issue of confusing booleans:

https://git.tt-rss.org/fox/tt-rss/commit/ab4dafa4be5909c66d7f60451a8a0fdffa5387f9

Thank you very much , that made things much easier!

Probably a silly question and maybe I just didn’t notice it after another pull recently (dynamic docker), but is anyone else getting a bunch of readability warnings? Thinking it could have had to do with php updates, but I don’t remember they showing up before this morning’s change.

plugins/af_readability/vendor/andreskrey/Readability/Readability.php:199 usort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero