PHP Fatal error: Uncaught Error: Class "Config" not found in /var/www/html/tt-rss/include/functions.php:39

Are you using stock Docker compose setup?

Yes

If not, either reproduce this issue on the official demo or switch to Docker and see if the issue is resolved.


Describe the problem you’re having:

Updated to the latest docker version this morning and now the app/updater refused to start, giving the error as stated in the subject of this ticket.

Last update I did was yesterday and everything was working fine.

Include steps to reproduce the problem:

tt-rss version (including git commit id):

Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:

Synology Docker

Please provide any additional information below:

Docker log:

|2021-02-23 08:13:59|stdout|(1 row)|
|---|---|---|
|2021-02-23 08:13:59|stdout|            140|
|2021-02-23 08:13:59|stdout|----------------|
|2021-02-23 08:13:59|stdout| schema_version |
|2021-02-23 08:13:59|stderr|NOTICE:  extension "pg_trgm" already exists, skipping|
|2021-02-23 08:13:58|stdout|db:5432 - accepting connections|
|2021-02-23 08:13:56|stderr|  thrown in /var/www/html/tt-rss/include/functions.php on line 39|
|2021-02-23 08:13:56|stderr|#1 {main}|
|2021-02-23 08:13:56|stderr|#0 /var/www/html/tt-rss/update.php(11): require_once()|
|2021-02-23 08:13:56|stderr|Stack trace:|
|2021-02-23 08:13:56|stderr|PHP Fatal error:  Uncaught Error: Class "Config" not found in /var/www/html/tt-rss/include/functions.php:39|

o rly

is it actually there, in /var/www/html/tt-rss/classes/config.php?

Yes, /var/www/html/tt-rss/classes/config.php exist but I’m using .env so I just cp’ed config.php-dist to classes/config.php and made no modifications to it.

amazing. good luck with that.

Hmm this is not my best day. Anyway. I restored my original config.php and put it in the classes folder.

Still no luck and the same error. Any help is much appreciated.

edit: I’m now using the docker image from yesterday to get things running again. I can’t figure out how the change to classes/config.php is causing this problem

classes/config.php (which defines the Config class) is completely different from config.php (the old configuration file). You need to restore classes/config.php to its original contents and then read over the following to figure out what (if anything-- I had to change nothing with my Docker Compose setup) you need to do:

thread of the month material right there. :man_facepalming:

just learning every day @fox! :slight_smile:

Excellent, this makes more sense now. Thanks for explaining this difference. As a teacher once said “there are no stupid questions”. well, he might have been wrong :slight_smile:

I had the same issue (Class “Config” not found in …functions.php).

git pull and git status in the container volume showed the config.php deleted. Do you have an idea, why it got deleted?

PS:
I resolved the issue with git checkout -- classes/config.php

I’m not using git, just docker-compose pull and classes/config.php is still missing. So I reverted to yesterday’s image.

Found the reason:
https://git.tt-rss.org/fox/ttrss-docker-compose/src/branch/static-dockerhub/src/app/startup.sh#L37

While building the docker container we should not exclude config.php (anymore). So classes/config.php was not deleted, but not inserted and not updated (Rename of Session-Config).

Sorry, I am currently not able to file a PR.

yeah https://git.tt-rss.org/fox/ttrss-docker-compose/commit/17c3197769c14c7524997981a7fc388ace823554

e: fixed images are up

Thanks gentlemen! All good again.