[GH-ISSUE #36] Valid response back, no image on server #28

Closed
opened 2026-02-25 23:40:27 +03:00 by kerem · 14 comments
Owner

Originally created by @scorobogaci on GitHub (Aug 14, 2017).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/36

ui-response
Server response is ok
{"status":"OK","type":"png","hash":"1ucq23hnr5.png","url":"http:\/\/192.168.99.100\/1ucq23hnr5.png","domain":"http:\/\/192.168.99.100"}

But image is not present in upload folder

Originally created by @scorobogaci on GitHub (Aug 14, 2017). Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/36 ![ui-response](https://user-images.githubusercontent.com/11941776/29278757-5b716df6-811e-11e7-8a22-06c683fbec4a.png) Server response is ok `{"status":"OK","type":"png","hash":"1ucq23hnr5.png","url":"http:\/\/192.168.99.100\/1ucq23hnr5.png","domain":"http:\/\/192.168.99.100"}` But image is not present in upload folder
kerem closed this issue 2026-02-25 23:40:27 +03:00
Author
Owner

@scorobogaci commented on GitHub (Aug 14, 2017):

Accesing after the url : http://192.168.99.100/1ucq23hnr5.png
redirects to the default upload page

<!-- gh-comment-id:322223307 --> @scorobogaci commented on GitHub (Aug 14, 2017): Accesing after the url : http:\/\/192.168.99.100\/1ucq23hnr5.png redirects to the default upload page
Author
Owner

@geek-at commented on GitHub (Aug 14, 2017):

looks like you have permission problems. check if the upload folders are created

<!-- gh-comment-id:322223879 --> @geek-at commented on GitHub (Aug 14, 2017): looks like you have permission problems. check if the upload folders are created
Author
Owner

@scorobogaci commented on GitHub (Aug 14, 2017):

@chrisiaut , upload folder is created inside container
/usr/share/nginx/html/upload exists

<!-- gh-comment-id:322224447 --> @scorobogaci commented on GitHub (Aug 14, 2017): @chrisiaut , upload folder is created inside container /usr/share/nginx/html/upload exists
Author
Owner

@geek-at commented on GitHub (Aug 14, 2017):

yeah but inside the upload folder is the 1ucq23hnr5.png folder created?

<!-- gh-comment-id:322225715 --> @geek-at commented on GitHub (Aug 14, 2017): yeah but inside the upload folder is the 1ucq23hnr5.png folder created?
Author
Owner

@scorobogaci commented on GitHub (Aug 14, 2017):

@chrisiaut nope, 1ucq23hnr5.png folder isn't created
also, sometimes image after upload appears for preview, sometimes not . but when clicking on the image, it redirects to default page

<!-- gh-comment-id:322226167 --> @scorobogaci commented on GitHub (Aug 14, 2017): @chrisiaut nope, 1ucq23hnr5.png folder isn't created also, sometimes image after upload appears for preview, sometimes not . but when clicking on the image, it redirects to default page
Author
Owner

@geek-at commented on GitHub (Aug 14, 2017):

must be a permission problem then

<!-- gh-comment-id:322227323 --> @geek-at commented on GitHub (Aug 14, 2017): must be a permission problem then
Author
Owner

@scorobogaci commented on GitHub (Aug 14, 2017):

logs from error.log on the container

2017/08/14 15:54:21 [error] 229#229: *59 FastCGI sent in stderr: "PHP message: P
HP Notice: Undefined index: HTTPS in /usr/share/nginx/html/index.php on line 17
" while reading response header from upstream, client: , server: _,
request: "POST / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168
.99.100", referrer: "http://192.168.99.100/"
2017/08/14 15:55:12 [error] 231#231: *63 FastCGI sent in stderr: "PHP message: P
HP Notice: Undefined index: HTTPS in /usr/share/nginx/html/index.php on line 17
" while reading response header from upstream, client: , server: _,
request: "POST /17aa3ngtwl.jpg HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000",
host: "192.168.99.100", referrer: "http://192.168.99.100/17aa3ngtwl.jpg"

<!-- gh-comment-id:322230303 --> @scorobogaci commented on GitHub (Aug 14, 2017): logs from error.log on the container 2017/08/14 15:54:21 [error] 229#229: *59 FastCGI sent in stderr: "PHP message: P HP Notice: Undefined index: HTTPS in /usr/share/nginx/html/index.php on line 17 " while reading response header from upstream, client: , server: _, request: "POST / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168 .99.100", referrer: "http://192.168.99.100/" 2017/08/14 15:55:12 [error] 231#231: *63 FastCGI sent in stderr: "PHP message: P HP Notice: Undefined index: HTTPS in /usr/share/nginx/html/index.php on line 17 " while reading response header from upstream, client: , server: _, request: "POST /17aa3ngtwl.jpg HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.99.100", referrer: "http://192.168.99.100/17aa3ngtwl.jpg"
Author
Owner

@geek-at commented on GitHub (Aug 14, 2017):

that's just notices, nothing unusual. No seriously check the permissions of the upload folder

<!-- gh-comment-id:322235193 --> @geek-at commented on GitHub (Aug 14, 2017): that's just notices, nothing unusual. No seriously check the permissions of the upload folder
Author
Owner

@scorobogaci commented on GitHub (Aug 14, 2017):

permisions

<!-- gh-comment-id:322236842 --> @scorobogaci commented on GitHub (Aug 14, 2017): ![permisions](https://user-images.githubusercontent.com/11941776/29280939-c1cf5e1c-8125-11e7-8283-5d0ea0a32c15.png)
Author
Owner

@scorobogaci commented on GitHub (Aug 14, 2017):

at permissions level seems to be ok

<!-- gh-comment-id:322236944 --> @scorobogaci commented on GitHub (Aug 14, 2017): at permissions level seems to be ok
Author
Owner

@geek-at commented on GitHub (Aug 14, 2017):

try the command

sudo su -c "touch /usr/share/nginx/html/upload/check" nginx

and see if it gets created or if it says permission denied

<!-- gh-comment-id:322237635 --> @geek-at commented on GitHub (Aug 14, 2017): try the command `sudo su -c "touch /usr/share/nginx/html/upload/check" nginx` and see if it gets created or if it says permission denied
Author
Owner

@scorobogaci commented on GitHub (Aug 14, 2017):

I know it;s kind of strange, but after restarting pc , everything worked
I've metioned that i have an app on :9000 port , and somehow SGI remember the request from that app, which is using this service, and even that after I'm making request from the app page, it still apend on the log file the old request from :9000

<!-- gh-comment-id:322237810 --> @scorobogaci commented on GitHub (Aug 14, 2017): I know it;s kind of strange, but after restarting pc , everything worked I've metioned that i have an app on :9000 port , and somehow SGI remember the request from that app, which is using this service, and even that after I'm making request from the app page, it still apend on the log file the old request from :9000
Author
Owner

@scorobogaci commented on GitHub (Aug 14, 2017):

sudo su -c "touch /usr/share/nginx/html/upload/check" nginx
sudo is not available in container :(

<!-- gh-comment-id:322238339 --> @scorobogaci commented on GitHub (Aug 14, 2017): `sudo su -c "touch /usr/share/nginx/html/upload/check" nginx` sudo is not available in container :(
Author
Owner

@scorobogaci commented on GitHub (Aug 14, 2017):

@chrisiaut thank you for your help :)
Can you also add cors requests to the app, things like :
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE'); header('Access-Control-Allow-Headers: Authorization');

I don't know it this is a good practice , but maybe you have another idea or good practice to deal with it

<!-- gh-comment-id:322311598 --> @scorobogaci commented on GitHub (Aug 14, 2017): @chrisiaut thank you for your help :) Can you also add cors requests to the app, things like : `header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE'); header('Access-Control-Allow-Headers: Authorization');` I don't know it this is a good practice , but maybe you have another idea or good practice to deal with it
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pictshare#28
No description provided.