title: curl - SPNEGO cannot find mechanisms to negotiate
body: <p>i'm trying to use php-curl with a microsoft web service: Here is my code (working on windows 10 with wamp):</p>
  
  <pre><code>&lt;?php
  
  $location = "http://10.0.100.19:7058/FOLDER12013/OData/Company('TEST')/WS_Clienti";
  $handle = curl_init($location);
  
  $credentials = 'CPGNET\username:password';
  $action =
  
  
  $proxy =  '11.22.33.44:8123';
  $headers = [
      'Method: GET',
      'User-Agent: PHP-SOAP-CURL',
      'Content-Type: text/xml; charset=utf-8',
  ];
  
  
  // Authentication
  curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_NTLM | CURLAUTH_BASIC | CURLAUTH_GSSNEGOTIATE | CURLAUTH_ANY);
  curl_setopt($handle, CURLOPT_USERPWD, $credentials);
  
  curl_setopt($handle, CURLINFO_HEADER_OUT, true);
  curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
  curl_setopt($handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
  curl_setopt($handle, CURLOPT_PROXY,$proxy);
  
  $response = "";
  echo("&lt;pre&gt;");
  $response = curl_exec($handle);
  
  $url_info = curl_getinfo($handle);
  
  print_r($url_info);
  
  echo(htmlentities($response));
  echo("&lt;/pre&gt;");
  </code></pre>
  
  <p>When I try to use this code from centos 7 (or ubuntu 15) I have an error 401 unautorized. Php, curl, libcurl have the same version on windows and linux (and all extensions are equal checking with phpinfo). So, I'm trying to use curl from linux:</p>
  
  <pre><code>curl --negotiate -u "CPGNET\username:password" --proxy 11.22.33.44:8123 "http://10.0.100.19:7058/FOLDER12013/OData/Company('TEST')/WS_Clienti" -v
  </code></pre>
  
  <p>But I have an error: </p>
  
  <pre><code>* gss_init_sec_context() failed: : SPNEGO cannot find mechanisms to negotiate
  </code></pre>
  
  <p>Please someone can help me. I don't understand why from linux this not works.
  Thank you</p>