0
I am with the following situation: has a code makes a post to a remote API sending a file (image).
Works on the local server (localhost | Wampserver | PHP Version 5.5.12)
Works on the Digital Ocean server (Server API: Apache 2.0 Handler | PHP Version 5.5.9-1ubuntu4.24)
In Locaweb does not work (Server API: CGI/Fastcgi | PHP Version 5.5.31)
I have already done several checks and found no solution. Any hint of which directive, version, path, etc, of what to check?
CURL is actually installed on the server?
– Kayo Bruno
Doesn’t work like? Gives some error message?
– bfavaretto
Yes, it is installed. It normally sends the text part.
– Danilo Miguel
@bfavaretto Does not send the image to the API. The rest of the form (text only) normally sends.
– Danilo Miguel
https://wiki.locaweb.com.br/pt-br/Utilizando_cURL_quando_a_diretiva_allow_url_fopen_est%C3%A1_desativada
– Otto
@Otto already checked it, I changed what it indicates in the article and did not solve.
– Danilo Miguel
This can be the maximum size limit for uploading or posting to that specific server.
– bfavaretto
@bfavaretto also already checked and is well below this limit.
– Danilo Miguel
Are you using the
curl_file_create
or directly the@arquivo
no POST? If it is the second method, which is already obsolete, you have to disable theCURLOPT_SAFE_UPLOAD
.– Inkeliz