Exception while creating PDO object:SQLSTATE[08006] [7] could not connect to server: Connection refused
Is the server running on host “localhost” (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host “localhost” (127.0.0.1) and accepting
TCP/IP connections on port 5432?
If you’re not using PostgreSQL you’ll need to also set DB_TYPE and DB_PORT.
It would also help us if you posted your code in actual code blocks. To do that, please type three backticks ``` on its own line, paste your code, then another three backticks ``` on its own line.
e: It also occurs to me that some shared hosts might host the database on separate servers. Usually whatever control panel software they have will tell you what you need to put in DB_HOST for your application to reach the database.
e2: Can you please tell us if you’re hosting this on a VPS/VDS or shared hosting? You don’t have to mention any company, but it will aid in providing advice.
[SOLUTION]
Look for .lock or .stamp files that do not have the owner/group “www-data” (the webserver account).
$ cd /var/www/html/tt-rss/lock
$ sudo chgrp www-data update_daemon.stamp
$ sudo chown www-data update_daemon.stamp
$ sudo service ttrss_backend restart
Maybe this should be mentioned in InstallationNotesHost? It seems likely that people installing directly would be using MySQL as most shared hosts only offer that; additionally, people not using containers on VPS/VDS are likely to be sharing the server with other applications and MySQL is pretty common for things.