edv / docker-spotweb

Dockerfile to easily set up Spotweb using Docker on the Raspberry Pi (or any compatible arm chipset) and regular x86 chipsets
MIT License
27 stars 19 forks source link

SpotWeb v0.68.36.34 on PHP v8.3.6 crashed object #58

Closed rayray4105 closed 2 months ago

rayray4105 commented 2 months ago

Hi,

Today I updated Spotweb to the latest version but now it is not working anymore. Did I do something wrong?

SpotWeb v0.68.36.34 on PHP v8.3.6 crashed object(Exception)#7 (7) { ["message":protected]=> string(44) "Unknown database engine () factory specified" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(28) "/app/lib/dbeng/dbeng_abs.php" ["line":protected]=> int(22) ["trace":"Exception":private]=> array(3) { [0]=> array(5) { ["file"]=> string(22) "/app/lib/Bootstrap.php" ["line"]=> int(148) ["function"]=> string(12) "getDbFactory" ["class"]=> string(9) "dbeng_abs" ["type"]=> string(2) "::" } [1]=> array(5) { ["file"]=> string(22) "/app/lib/Bootstrap.php" ["line"]=> int(42) ["function"]=> string(13) "getDaoFactory" ["class"]=> string(9) "Bootstrap" ["type"]=> string(2) "->" } [2]=> array(5) { ["file"]=> string(14) "/app/index.php" ["line"]=> int(19) ["function"]=> string(4) "boot" ["class"]=> string(9) "Bootstrap" ["type"]=> string(2) "->" } } ["previous":"Exception":private]=> NULL } Unknown database engine () factory specified

edv commented 2 months ago

Quite a bit was changed recently around database configuration, it should however not break anything

Can you share how you start the Docker container? (your docker-compose.yml or the Docker command). I'm curious if (and what) environment setting you have configured.

rayray4105 commented 2 months ago

I did not use a compose.yml unfortunately.

edv commented 2 months ago

That is also fine, but can you give some more information on how you start the container? I just tried several combinations of settings, but I did not manage to get it to break. It would help me in debugging what might have gone wrong in the recent changes I made.

rayray4105 commented 2 months ago

if I do a manual restart the following error lines appear in the log.

2024/04/23 07:23:13 | stdout | 172.17.0.1 - - [23/Apr/2024:07:23:13 +0200] "GET / HTTP/1.1" 200 446 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_157) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15" 2024/04/23 07:23:13 | stdout | 2024/04/23 07:23:13 [error] 101#101: *1 FastCGI sent in stderr: "PHP message: SpotWeb Exception occured: Unknown database engine () factory specified" while reading response header from upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.178.136:8085"

2024/04/23 07:22:50 stdout s6-rc: info: service legacy-services: starting
2024/04/23 07:22:50 stdout s6-rc: info: service legacy-cont-init successfully started
2024/04/23 07:22:50 stdout cont-init: info: /etc/cont-init.d/40-initialize-db exited 0
2024/04/23 07:22:50 stdout Admin has already logged in, no need to set default password
2024/04/23 07:22:50 stdout #2 {main}/etc/cont-init.d/40-initialize-db: line 24: [: -eq: unary operator expected
2024/04/23 07:22:50 stdout #1 /app/bin/upgrade-db.php(44): Bootstrap->getDaoFactory()
2024/04/23 07:22:50 stdout #0 /app/lib/Bootstrap.php(148): dbeng_abs::getDbFactory()
2024/04/23 07:22:50 stdout  
2024/04/23 07:22:50 stdout  
2024/04/23 07:22:50 stdout Unknown database engine () factory specified
2024/04/23 07:22:50 stdout Database schema or settings upgrade failed:
2024/04/23 07:22:50 stdout  
2024/04/23 07:22:50 stdout SpotWeb crashed
rayray4105 commented 2 months ago

I am running the docker official image for mariadb. https://registry.hub.docker.com/_/mariadb/

rayray4105 commented 2 months ago

my settings are pretty standard I think.

image

edv commented 2 months ago

The only difference I see is that DB_ENGINE is not configured, but that should default to MySQL (pdo_mysql). I tried to replicate the problem, but it might have to do with the Docker version you are running on Synology.

I made some changes which should resolve this, can you update to the latest Docker image and see if it works for you?

And if it does not work, can you try adding another environment variable called DB_ENGINE with value pdo_mysql and let me know if that resolves the problem?

rayray4105 commented 2 months ago

adding DB_ENGINE did the trick. I did not pull a new image yet (it is/was not available yet)

edv commented 2 months ago

Good to hear, if you encounter other problems, let me know