ArturSierzant / OMPD

O!MPD is free, opensource MPD client based on PHP and mySQL.
http://ompd.pl
GNU General Public License v3.0
40 stars 13 forks source link

Cannot get O!MPD to work with nginx and MariaDB #81

Closed hardheid closed 2 months ago

hardheid commented 5 years ago

I have been trying to get O!MPD to work using MariaDB and nginx on an OrangePi Zero running Armbian Ubuntu 18.04. However, I can´t get around the 500 error in nginx. This is the result from the nginx log:

Stack trace:

0 /var/www/html/ompd/include/initialize.inc.php(195): checkDefaultFavorites()

1 /var/www/html/ompd/message.php(29): require_once('/var/www/html/o...')

2 {main}

thrown in /var/www/html/ompd/include/initialize.inc.php on line 744" while reading response header from upstream, client: 192.168.10.110, server: mauspi.local, request: "GET /message.php?message=%5Bb%5DGD2%20not%20loaded%5B%2Fb%5D%5Blist%5D%5B%2A%5DCompile%20PHP%20with%20GD2%20support.%5B%2A%5DOr%20use%20a%20loadable%20module%20in%20the%20php.ini%5B%2Flist%5D&type=error&menu=media&skin=ompd_default&username=&sign=&timestamp=5c24ed85 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "mauspi.local"<

Any idea what is causing this error?

ArturSierzant commented 5 years ago

It seems like GD2 extension is not loaded. O!MPD requires PHP 5.2.0 or later with extension: GD2, ICONV, MBSTRING, MYSQLi, JSON and CTYPE. Please check it and let me know if that helped.

marcbth commented 5 years ago

server {

listen 80 default_server;
listen [::]:80 default_server;

root /var/www/ompd;
index index.php index.html index.htm;

server_name www.ompd.net;

# This section can be copied into an existing default setup
location / {
    allow all;
    index index.php;
    location ~ \.php {
            try_files $uri index.php =404;
            fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $request_filename;
            include /etc/nginx/fastcgi_params;
            fastcgi_read_timeout 1800;
    }

}

}

this is my ngins.conf its work

hardheid commented 5 years ago

It works now, thanks! Although I am able to play audio now, the library won't update and says 'YOUR DATABASE IS EMPTY. PLEASE UPDATE IT.'. When I run 'UPDATE ALL' in the configuration the whole thing just keeps running and restarting.

marcbth commented 5 years ago

You must in mysql drop the database, then you create a new one in ompd. its a bug. i think its the new php version. in my case, the update start right, when i start it from a iPad .

Cliff

ArturSierzant commented 5 years ago

Thanks @marcbth for help. Could you please write how to reproduce this bug with database?