curl - How to properly debug PHP curl_setopt_array when it's returing false? -
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 make tests run on https. curlopt_ssl_verifyhost => false, // required make 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 of specified options // cannot set, , stops processing further options. $result = curl_setopt_array($this->curlhandle, $this->additionalcurloptions + $curl_options); ?>
i need figure out what's going wrong curl options. how debug curl_setopt_array()
itself? since cookiejar (tested) working filename, url correct, header function working, , every other option hard-coded, should dig deeper?
you should use plural curl_setopt
instead of singular curl_setopt_array
debugging.
Comments
Post a Comment