Error 500 and database connection error

by rssreader-reader, Friday, November 23, 2018, 13:22 (1953 days ago)

Hi all,
I am using Uberspace as my hosting provider and followed their instructions to install selfoss on my account.

When I load the page I get the following GET 500 error for this domain in the console:
https://<my_domain>/selfoss/?offset=0&itemsPerPage=50&search=&type=newest&tag=&source=&sourcesNav=false&ajax=true

In the debug message I get the following errors:
[2018-11-23 13:00:11] selfoss.DEBUG: Establish database connection
[2018-11-23 13:00:11] selfoss.ERROR: PDO::__construct() expects parameter 3 to be string, array given {"exception":"[object] (TypeError(cod$
[stacktrace]
#0 /var/www/virtual/<username>/html/selfoss/vendor/bcosca/fatfree-core/db/sql.php(519): PDO->__construct('mysql:host=loca...', '<username>', Array,$
#1 /var/www/virtual/<username>/html/selfoss/daos/mysql/Database.php(42): DB\\SQL->__construct('mysql:host=loca...', '<username>', Array, Array)
#2 /var/www/virtual/<username>/html/selfoss/daos/Sources.php(25): daos\\mysql\\Database->__construct()
#3 /var/www/virtual/<username>/html/selfoss/controllers/Sources.php(27): daos\\Sources->__construct()
#4 /var/www/virtual/<username>/html/selfoss/vendor/bcosca/fatfree-core/base.php(1806): controllers\\Sources->show(Object(Base), Array, 'control$
#5 /var/www/virtual/<username>/html/selfoss/vendor/bcosca/fatfree-core/base.php(1627): Base->call(Array, Array, Array)
#6 /var/www/virtual/<username>/html/selfoss/index.php(80): Base->run()
#7 {main}
"}

It seems that the database connection is not possible as my database <username>_selfoss is still empty.
The crendentials should be correct, as I can login with them in adminer.

Could you please have a look?
Thanks!

Error 500 and database connection error

by jtojnar, Saturday, November 24, 2018, 15:22 (1952 days ago) @ rssreader-reader
edited by jtojnar, Thursday, August 08, 2019, 13:34

Hey!

selfoss is unfortunately based on fatfree framework, which sometimes behaves rather peculiarly. In this case, looking at the documentation, I would guess your password contains a comma character, which makes the framework split the password into an array. To fix that, you can either change the password or wrap it in quotes like this: db_password="pass,word"

RSS Feed of thread
powered by my little forum