• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

Unable to Upload from script with API

Status
Not open for further replies.

Dredd

Chevereto Member
I recently moved to a new scaleaway drop for my webserver.running nginx and php5 everything runs great except when sing the API to upload images to my imghost. All my settings are the same including the API key. Here are the error code I get when attemoting to upload with API
Code:
FROM Imagehost error.log

[error] 4064#0: *12611 FastCGI sent in stderr: "PHP message: file_get_contents: can't fetch target URL" while reading response header from upstream, client: 108.162.229.130, server: imagehost.com, request: "GET /api/1/upload/?key=XXXXXXXXXXXXXXXXXXXXXXXXXX&source=http://uploading.server/XXXXXXXXXXXXXXXXX.jpg&format=json HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "hostname.com"



Code:
FROM UPLOADING SERVER:: response code

{"status_code":400,"error":{"message":"file_get_contents: can't fetch target URL","code":202,"context":"CHV\\UploadException"},"status_txt":"Bad Request"}


I have been over everything I can think of for a solution. I have increased timeouts, double checked my hostnames and their response. I can not think of anything else to check. any help is greatly appreciated.

I normally uplaod using a bash script that has run without incident for 2+ years.
 
The system is telling you that file get contents is not working properly. Try to check if there is some safe restriction or something like that.
 
I have no restrictions set on the image host. alll conf. file are the same as before. could it be low resources? I am now runnign on an scaleaway droplet with 4-cores ARMv7 CPU with 2GB of RAM and a 1 Gbit/s network card.
If not resources, where can I look for safe restrictions?
 
Nothing to do with resources or the script. The script is telling you that file get contents, which is a PHP function, can't fetch the contents of the URL. It could be a restriction, a timeout, etc.

In this case you should try to install curl and see it the thing works with that.
 
problem found, missing firewall seting. please close thread.

thanks you for the information.
 
Status
Not open for further replies.
Back
Top