Curl does not work on a given server

Asked

Viewed 161 times

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?

  • Doesn’t work like? Gives some error message?

  • Yes, it is installed. It normally sends the text part.

  • @bfavaretto Does not send the image to the API. The rest of the form (text only) normally sends.

  • https://wiki.locaweb.com.br/pt-br/Utilizando_cURL_quando_a_diretiva_allow_url_fopen_est%C3%A1_desativada

  • @Otto already checked it, I changed what it indicates in the article and did not solve.

  • This can be the maximum size limit for uploading or posting to that specific server.

  • @bfavaretto also already checked and is well below this limit.

  • 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 the CURLOPT_SAFE_UPLOAD.

Show 4 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.