LycheeOrg / Lychee-v3

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.

Home Page:https://lycheeorg.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server error or API not found with php7.3

domipi opened this issue · comments

Hello,

Detailed description of the problem

I follow all the steps specified into https://github.com/LycheeOrg/Lychee/wiki/Installation using php7.3-fpm support.

I got the following error "Server error or API not found" with in the console :
description: "Server error or API not found."
​params: Object { function: "Session::init" }
​response: SyntaxError: "JSON.parse: unexpected end of data at line 1 column 1 of the JSON data"

Steps to reproduce the issue

/etc/init.d/nginx start
/etc/init.d/php7.3-fpm start
launching with my browser : https://********/albums/

Output of the diagnostics (Settings => Diagnostics)

Here is my current config:
server {

    root /var/www/html;

    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html;

    server_name ****(obfusced)

    location / {
            try_files $uri $uri/ =404;
    }

    location ~.php$ {
            fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
    }

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/*******/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/*******/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

==> /var/log/nginx/access.log <==
1 - - [06/Mar/2020:22:06:24 +0000] "GET /albums/ HTTP/1.1" 200 19727 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"
1 - - [06/Mar/2020:22:06:24 +0000] "GET /albums/dist/main.css HTTP/1.1" 304 0 "https:/://
/albums/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"
1 - - [06/Mar/2020:22:06:24 +0000] "GET /albums/dist/user.css HTTP/1.1" 304 0 "https://://
/albums/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"
1 - - [06/Mar/2020:22:06:24 +0000] "GET /albums/dist/main.js HTTP/1.1" 304 0 "https://
/albums/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"
1 - - [06/Mar/2020:22:06:24 +0000] "POST /albums/php/index.php HTTP/1.1" 200 31 "https://://
**/albums/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"

It looks like as if php7.3 is ignored...

Browser and system

Firefox/73.0"
/etc/debian_version 9.12

Thanks in advance for you help !

Have you checked the FAQ?

Yes, I did but I don't find any clews about the issue.

Ok, I found it was due to this missing line into : /etc/nginx/fastcgi_params

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Problem is now resolved

Thanks for letting us know!