Error from cURL: Error [6]: Couldn't resolve host 'wwwcie.ups.com'
i suspect this is an issue with running from inside the apache chroot, but do
not know how to proceed and/or confirm this suspicion. just to be thorough,
here's the chunk of php code that generates the error:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequest);
curl_setopt($ch, CURLOPT_TIMEOUT, (int)$timeout);
if ($this->logfile) {
error_log("UPS REQUEST: " . $xmlRequest . "\n", 3, $this->logfile);
}
$xmlResponse = curl_exec ($ch);
if (curl_errno($ch) && $this->logfile) {
$error_from_curl = sprintf('Error [%d]: %s', curl_errno($ch), curl_error($ch));
error_log("Error from cURL: " . $error_from_curl . "\n", 3, $this->logfile);
}
i presume url = the url i gave above.
any advice appreciated.
cheers,
jake
Do you have etc/resolv.conf in your chroot?
DS
Yes, that's likely. Think how programs on the computer find out
what nameserver to use and this should lead you in the right
direction.
Or run httpd(8) under ktrace(1) (starting httpd in single-process
mode makes this easier) and that should also identify it for you.
search. read.
thanks to all who gave me the resolv.conf suggestion both on and off list. i
should've figured that out since i did see the failure had to do with
gethostbyname(), <doh!>. all is working now, and if this goes well it will mean
i can donate some $$ to the project.