Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

888k Downloads

Error when deploy dynmap with nginx+php

RuofengX opened this issue ยท 1 comments

commented

Open the website http://:80/map, it says
Could not retrieve configuration: Internal Server Error
Here is my nginx error.log:

2021/06/21 18:58:21 [error] 171863#171863: *19 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /var/www/html/map/standalone/MySQL_funcs.php:28
Stack trace:
#0 /var/www/html/map/standalone/MySQL_funcs.php(38): initDbIfNeeded()
#1 /var/www/html/map/standalone/MySQL_funcs.php(63): getStandaloneFileByServerId()
#2 /var/www/html/map/standalone/MySQL_configuration.php(22): getStandaloneFile()
#3 {main}
thrown in /var/www/html/map/standalone/MySQL_funcs.php on line 28" while reading response header from upstream, client: 124.225.62.78, server: _, request: "GET /map/standalone/MySQL_configuration.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "175.27.160.37", referrer: "http://175.27.160.37/map/"

My browser can open the file /map/standalone/config.js, so I think the nginx has the permission.
Also I can use command ubuntu@VM-0-3-ubuntu:/var/www/html$ sudo -u minecraft touch ./map/standalone/1.1 to create file, so the user 'minecraft' also have the permission.
BTW, I use sudo -u minecraft command to run java.
My php version is 7.4.3

I don't know what's wrong, and spending hours on this. I also searched the issues, I think there's no duplicate.
Anyone to help me?

commented

OK, I find the way out.
Just install php7.4-mysql (apt install). LOL