Find your content:

Search form

You are here

PHP ExactTarget API returns Empty Response when trying to connect

 
Share

I'm just trying to do the basic connection to the service, but I'm getting the following message on the page:

Unable to load the webpage because the server sent no data.
Error code: ERR_EMPTY_RESPONSE

This is the code I'm using.

$includeDir = realpath(dirname(__FILE__).'/includes/');
$path = ini_get('include_path');
$path = $includeDir . PATH_SEPARATOR . $path;
ini_set('include_path',$path);

require('exacttarget_soap_client.php');

$wsdl = 'https://webservice.exacttarget.com/etframework.wsdl';

try {
    @$client = new ExactTargetSoapClient($wsdl,array('trace'=>1));

    $client->username = '<username hidden>';
    $client->password = '<password hidden>';

    $param = new ExactTarget_VersionInfoRequestMsg();
    $param->IncludeVersionHistory = True;
    $results = $client->VersionInfo($param);
    var_dump($results);
} catch(Exception $e){
    echo $e->getMessage();
}

Just to make sure I wasn't missing an include or anything I commented out

$results = $client->VersionInfo($param);
var_dump($results);

When I do that and just echo out something it works fine. It's when it tries to execute the VersionInfo call that it seems to break.

What am I missing here?


Attribution to: LoneWolfPR

Possible Suggestion/Solution #1

Turns out the problem was I didn't have mcrypt installed. I thought I had, but nope. That was it.


Attribution to: LoneWolfPR
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/31806

My Block Status

My Block Content