Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid response back, no image on server #36

Closed
scorobogaci opened this issue Aug 14, 2017 · 14 comments
Closed

Valid response back, no image on server #36

scorobogaci opened this issue Aug 14, 2017 · 14 comments

Comments

@scorobogaci
Copy link

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

@scorobogaci
Copy link
Author

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

@geek-at
Copy link
Member

geek-at commented Aug 14, 2017

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

@scorobogaci
Copy link
Author

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

@geek-at
Copy link
Member

geek-at commented Aug 14, 2017

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

@scorobogaci
Copy link
Author

@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

@geek-at
Copy link
Member

geek-at commented Aug 14, 2017

must be a permission problem then

@scorobogaci
Copy link
Author

scorobogaci commented 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"

@geek-at
Copy link
Member

geek-at commented Aug 14, 2017

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

@scorobogaci
Copy link
Author

permisions

@scorobogaci
Copy link
Author

at permissions level seems to be ok

@geek-at
Copy link
Member

geek-at commented 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

@scorobogaci
Copy link
Author

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

@scorobogaci
Copy link
Author

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

@scorobogaci
Copy link
Author

@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

@geek-at geek-at closed this as completed Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants