<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PHP CURL started returning no results in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-CURL-started-returning-no-results/m-p/27574#M14575</link>
    <description>&lt;P&gt;Do a phpinfo() and see if curl_exec is in the list of disabled functions.&lt;/P&gt;</description>
    <pubDate>Sun, 01 Jul 2012 19:28:15 GMT</pubDate>
    <dc:creator>TJPride</dc:creator>
    <dc:date>2012-07-01T19:28:15Z</dc:date>
    <item>
      <title>PHP CURL started returning no results</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-CURL-started-returning-no-results/m-p/27572#M14574</link>
      <description>&lt;P&gt;Hey All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have been using my eStore for a few months now, and its been great.&amp;nbsp; I had no move my servers and obtain new IP's.&amp;nbsp; I have set up my server (with the SLL certs), and modified all the IPs correctly, they all work and tested fine. However I am having wierd functionality with the CURL statements, they started returning no results almost 80% of the time, and now 100%.&amp;nbsp; I have used the sample code provided by Authorize.net (with the test login), just to see if it was my code or not, and I am still getting no response from that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My "Send post" function i added an error message to see what was going on:&lt;/P&gt;&lt;PRE&gt;function sendPost($postURL, $post_string)
{
#echo $post_string;
    // initiate curl object
    $request = curl_init($postURL);
        // set to 0 to eliminate header info from response
        curl_setopt($request, CURLOPT_HEADER, 0);
        // Returns response data instead of TRUE(1)
        curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
        // use HTTP POST to send form data
        curl_setopt($request, CURLOPT_POSTFIELDS, $post_string);
        // uncomment this line if you get no gateway response.
        curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE);
        // execute curl post and store results in $post_response
        $post_response = curl_exec($request);
        // Checks for Errors
        if (curl_errno($request) &amp;gt; 0)
        {
#           $error = curl_getinfo($request);
#           echo "ERROR: &amp;lt;BR&amp;gt;";
#           print_r($error);
            $_SESSION['curl_error'] = curl_getinfo($request);
            $_SESSION['gnc_order_error'] = TRUE;
        }
    curl_close ($request); // close curl object
    return $post_response;
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;When i echo the results of the return "curl_getinfo" I get :&lt;/P&gt;&lt;PRE&gt;url = &lt;A target="_blank" href="https://secure.authorize.net/gateway/transact.dll"&gt;https://secure.authorize.net/gateway/transact.dll&lt;/A&gt;
http_code = 0
header_size = 0
request_size = 0
filetime = -1
ssl_verify_result = 0
redirect_count = 0
total_time = 0
namelookup_time = 0
connect_time = 0
pretransfer_time = 0
size_upload = 0
size_download = 0
speed_download = 0
speed_upload = 0
download_content_length = 0
upload_content_length = 0
starttransfer_time = 0
redirect_time = 0&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also issued from my command line:&lt;/P&gt;&lt;PRE&gt;$ curl &lt;A target="_blank" href="https://secure.authorize.net/gateway/transact.dll"&gt;https://secure.authorize.net/gateway/transact.dll&lt;/A&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;and as a response I got :&lt;/P&gt;&lt;PRE&gt;&amp;lt;HTML&amp;gt;&amp;lt;BODY&amp;gt;&amp;lt;H3&amp;gt;The following errors have occurred.&amp;lt;/H3&amp;gt;(13) The merchant login ID or password is invalid or the account is inactive.&amp;lt;BR&amp;gt;&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Soo I have to believe that Curl is properly communicating with authorize.net and there cant be anything wrong with my firewall or router (or IP's for that matter)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried to do all this without directing my website to "https" to see if it is my SSL cert, and that did not work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just changed my transactionKey to check that, and still same issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am totally stummped and just dont know where to go from here.&lt;/P&gt;&lt;P&gt;Any help would be amazing!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jul 2012 14:53:51 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-CURL-started-returning-no-results/m-p/27572#M14574</guid>
      <dc:creator>joshd</dc:creator>
      <dc:date>2012-07-01T14:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: PHP CURL started returning no results</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-CURL-started-returning-no-results/m-p/27574#M14575</link>
      <description>&lt;P&gt;Do a phpinfo() and see if curl_exec is in the list of disabled functions.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jul 2012 19:28:15 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-CURL-started-returning-no-results/m-p/27574#M14575</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2012-07-01T19:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: PHP CURL started returning no results</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-CURL-started-returning-no-results/m-p/27618#M14595</link>
      <description>&lt;P&gt;Thanks for the reply, After much frustration, I went back to my network properties, and saw that I did not change the DNS servers to my new hosting facility. Not that I thought it would make a difference, but I changed those IPs and almost immedately my test page worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Curl was enabled in phpinfo(), thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This still makes no sense in my head how it worked after my switch sometimes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;None the less, I seem to be back up and running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 21:14:58 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/PHP-CURL-started-returning-no-results/m-p/27618#M14595</guid>
      <dc:creator>joshd</dc:creator>
      <dc:date>2012-07-02T21:14:58Z</dc:date>
    </item>
  </channel>
</rss>

