peterbb
Forum Replies Created
-
Done! Finally everything is working.
Added the line
curl_setopt($this->handle, CURLOPT_RESOLVE, array("api.www.ads-software.com:80:66.155.40.187", "api.www.ads-software.com:443:66.155.40.187"));
inwp-includes/Requests/Transport/cURL.php
. What an absurd problem.Update: IPv6 is now working on the server, but there are still problems. To see that IPv6 works,
curl -6 google.com
spits out some html from google.Now, both
curl https://api.www.ads-software.com/translations/core/1.0/
andcurl https://api.www.ads-software.com/translations/core/1.0/
spits out all the supported languages, butcurl -6 https://api.www.ads-software.com/translations/core/1.0/
givescurl: (6) Could not resolve host: api.www.ads-software.com
(it also happens with http). This makes sense, since there is no AAAA record forapi.www.ads-software.com
as far as I can see.Edit: This is intentional, cf. https://meta.trac.www.ads-software.com/ticket/3090
But it’s not like I *want* to use IPv6, so why is curl trying to use it anyway?
I have managed to narrow the problem down to the combination of cURL and ipv6. From
# curl -6 google.com
,which printscurl: (7) Couldn't connect to server
, and# ping6 -c 1 google.com
, which printPING google.com (2a00:1450:400e:803::200e): 56 data bytes ping6: sendmsg: No route to host
we can see that ipv6 is not working on the machine. I wonder if this is related to
Ramnode — OpenBSD IPv6 Issue (my OpenBSD server is running on a Ramnode KVM).I tried to configure curl to use IPv4, by adding
curl_setopt($this->handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
inwp-includes/Requests/Transport/cURL.php
after the handle is created in the constructor, but this had no effect. BothCURLOPT_IPRESOLVE
andCURL_IPRESOLVE_V4
are defined, so I would have thought it would work. ??- This reply was modified 7 years, 1 month ago by peterbb.
Thanks for the lead!
OpenBSD uses LibreSSL by default, not OpenSSL, so that might be why.
openssl version
givesLibreSSL 2.6.3
, but I guess that doesn’t tell us too much.I’ll try to dig further into it now, but if anyone has some more details, then please tell me!
Edit: Simply installing
openssl-1.0.2l
and restarting did not change anything—as expected, I guess. I guess I’ll need to either make it use openssl (recompile php? :/) or figure out where the php-code fails.- This reply was modified 7 years, 1 month ago by peterbb.