HaschekSolutions / pictshare

:camera: PictShare is an open source image, mp4, pastebin hosting service with a simple resizing and upload API that you can host yourself. :rice_scene:
https://www.pictshare.net
Apache License 2.0
840 stars 125 forks source link

File /usr/share/nginx/html/api/../data/sha1.csv not found running on alpine:arm #97

Closed iav closed 4 years ago

iav commented 5 years ago

I try to run your docker image on ARM Small Board Computers. There have to use non-x86 based images, I lightly change your dockerfile. When image runs on aRaspberryPi3 B+ I see an error on console during adding of picture

[22-Sep-2019 00:54:40] WARNING: [pool www] child 20 said into stderr: "NOTICE: PHP message: PHP Warning:  fopen(/usr/share/nginx/html/api/../data/sha1.csv): failed to open stream: No such file or directory in /usr/share/nginx/html/inc/core.php on line 368"
[22-Sep-2019 00:54:40] WARNING: [pool www] child 20 said into stderr: "NOTICE: PHP message: PHP Warning:  fopen(/usr/share/nginx/html/api/../data/sha1.csv): failed to open stream: No such file or directory in /usr/share/nginx/html/inc/core.php on line 368"
2019/09/22 00:54:40 [error] 15#15: *1 FastCGI sent in stderr: "PHP message: PHP Warning:  fopen(/usr/share/nginx/html/api/../data/sha1.csv): failed to open stream: No such file or directory in /usr/share/nginx/html/inc/core.php on line 368PHP message: PHP Warning:  fopen(/usr/share/nginx/html/api/../data/sha1.csv): failed to open stream: No such file or directory in /usr/share/nginx/html/inc/core.php on line 368" while reading response header from upstream, client: 192.168.1.33, server: _, request: "POST /api/upload.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "pi:81", referrer: "http://pi:81/"

Strange but I not see this error if run same dockerfile on x86 host. But I check, there no /usr/share/nginx/html/api/../data/sha1.csv file, and seems like /usr/share/nginx/html/inc/core.php on line 368 true tries to open it.

geek-at commented 5 years ago

You may have to create it forst or give the webserver and php-fpm enough rights to create it

iav commented 5 years ago

There are owner nginx:nginx. seems it not tryes to create, but use after I create empty file and chown to nginx.

geek-at commented 4 years ago

fixed in https://github.com/HaschekSolutions/PictShare-Docker/commit/4cbb8a3e935f8a158911a1b4510961748c974976