jgeusebroek / docker-spotweb

A docker image running ubuntu/20.04 Linux and Spotweb
47 stars 27 forks source link

Docker-compose Table 'spotweb.settings' doesn't exist #809 #55

Open a8ree opened 1 year ago

a8ree commented 1 year ago

I'm trying to deploy using the Docker-compose method. The install looks OK but there is some issue with accessing tables in the sql db

To Reproduce Use Docker-compose to deploy, run through install and try access the root site

SpotWeb v0.68.34.34 on PHP v8.1.16 crashed object(SqlErrorException)https://github.com/spotweb/spotweb/pull/14 (7) { ["message":protected]=> string(51) "42S02: 1146: Table 'spotweb.settings' doesn't exist" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(-1) ["file":protected]=> string(40) "/var/www/spotweb/lib/dbeng/dbeng_pdo.php" ["line":protected]=> int(70) ["trace":"Exception":private]=> array(6) { [0]=> array(5) { ["file"]=> string(40) "/var/www/spotweb/lib/dbeng/dbeng_pdo.php" ["line"]=> int(186) ["function"]=> string(4) "exec" ["class"]=> string(9) "dbeng_pdo" ["type"]=> string(2) "->" } [1]=> array(5) { ["file"]=> string(50) "/var/www/spotweb/lib/dao/Base/Dao_Base_Setting.php" ["line"]=> int(25) ["function"]=> string(10) "arrayQuery" ["class"]=> string(9) "dbeng_pdo" ["type"]=> string(2) "->" } [2]=> array(5) { ["file"]=> string(72) "/var/www/spotweb/lib/services/Settings/Services_Settings_DbContainer.php" ["line"]=> int(29) ["function"]=> string(14) "getAllSettings" ["class"]=> string(16) "Dao_Base_Setting" ["type"]=> string(2) "->" } [3]=> array(5) { ["file"]=> string(34) "/var/www/spotweb/lib/Bootstrap.php" ["line"]=> int(217) ["function"]=> string(10) "initialize" ["class"]=> string(29) "Services_Settings_DbContainer" ["type"]=> string(2) "->" } [4]=> array(5) { ["file"]=> string(34) "/var/www/spotweb/lib/Bootstrap.php" ["line"]=> int(43) ["function"]=> string(11) "getSettings" ["class"]=> string(9) "Bootstrap" ["type"]=> string(2) "->" } [5]=> array(5) { ["file"]=> string(26) "/var/www/spotweb/index.php" ["line"]=> int(19) ["function"]=> string(4) "boot" ["class"]=> string(9) "Bootstrap" ["type"]=> string(2) "->" } } ["previous":"Exception":private]=> NULL } 42S02: 1146: Table 'spotweb.settings' doesn't exist

alex3305 commented 1 year ago

I also encountered this, however there seems to be an easy fix:

docker exec -it spotweb php /var/www/spotweb/bin/upgrade-db.php

Small edit: I re-tested and I had to run the above command twice to get to an interface. To be able to login I had to also reset the password with:

docker exec -it spotweb php /var/www/spotweb/bin/upgrade-db.php --reset-password admin