title: How do I debug a php nusoap call requiring basic authentication that doesn't respond at all?
body: <p>I am trying to re-write a Drupal module that has fallen behind the API of the gateway it connects to.</p>
  
  <p>A stripped back version of the code I think is causing the problem is as follows:</p>
  
  <pre><code>$namespace = ($this-&gt;testing) ? 'https://api.sandbox.ewaypayments.com/' : 'https://api.ewaypayments.com/';
  $endpoint = $this-&gt;url;
  $httpUsername = $this-&gt;user_name;
  $httpPassword = $this-&gt;password;
  
  $client = new nusoap_client($endpoint, TRUE);
  $client-&gt;setCredentials($httpUsername, $httpPassword, 'basic');
  $client-&gt;response_timeout = 50;
  $result = $client-&gt;call($operation, array('request' =&gt; $params), $namespace);
  </code></pre>
  
  <p>The <code>$result</code> is consistently false.  If I put anything like this into my code it also consistently returns <code>empty</code>:</p>
  
  <pre><code>$error = $client-&gt;getError(); 
  watchdog('connection_message', $error);
  </code></pre>
  
  <p>I'm a bit out of my depth and without any error messages in my Apache logs or in the Drupal watchdog I cannot see a way forward.</p>