Code:
<?php
$this->curlHandle = curl_init();
$curl_options = $this->additionalCurlOptions + array(
CURLOPT_COOKIEJAR => $this->cookieFile,
CURLOPT_URL => $base_url,
CURLOPT_FOLLOWLOCATION => TRUE,
CURLOPT_MAXREDIRS => 5,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_SSL_VERIFYPEER => FALSE, // Required to make the tests run on https.
CURLOPT_SSL_VERIFYHOST => FALSE, // Required to make the tests run on https.
CURLOPT_HEADERFUNCTION => array(&$this, 'curlHeaderCallback'),
);
if (isset($this->httpauth_credentials)) {
$curl_options[CURLOPT_USERPWD] = $this->httpauth_credentials;
}
// curl_setopt_array() returns FALSE if any of the specified options
// cannot be set, and stops processing any further options.
$result = curl_setopt_array($this->curlHandle, $this->additionalCurlOptions + $curl_options);
?>
I need to figure out what's going wrong with those curl options. How to debug the curl_setopt_array() itself? Since the cookiejar is a (tested) working filename, url is correct, the header function is working, and every other option is hard-coded, what should i do to dig deeper?