curl-and-php
NTLM auth error
From: Doug Dalton <ddalton_at_shortbus.net>
Date: Sat, 20 Dec 2008 22:56:31 -0800
I am having a problem with NTLM auth with 7.15.5 on centos 5.2 getting the error :
gss_init_sec_context() failed: : Unknown code krb5 195* Authentication problem. Ignoring this.
Does this mean a bad password? (I am using a known good password)
Version
curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
using php:
PHP 5.1.6 (cli) (built: Jul 16 2008 19:52:52)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
$header=Array();
$cookiefile = tempnam("/tmp", "TMPCOOKIE");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, 'Server Agent');
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_HTTPAUTH,CURLAUTH_ANY);
$header[]="Depth: 0";
$header[]= "Translate: f";
$header[]= "Content-Type: text/xml";
curl_setopt( $ch, CURLOPT_HTTPHEADER, $header );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookiefile);
curl_setopt ($ch, CURLOPT_COOKIEFILE, $cookiefile);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result=curl_exec ($ch);
$responsecode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
Debugging:
Date: Sat, 20 Dec 2008 22:56:31 -0800
I am having a problem with NTLM auth with 7.15.5 on centos 5.2 getting the error :
gss_init_sec_context() failed: : Unknown code krb5 195* Authentication problem. Ignoring this.
Does this mean a bad password? (I am using a known good password)
Version
curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
using php:
PHP 5.1.6 (cli) (built: Jul 16 2008 19:52:52)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
$header=Array();
$cookiefile = tempnam("/tmp", "TMPCOOKIE");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, 'Server Agent');
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_HTTPAUTH,CURLAUTH_
$header[]="Depth: 0";
$header[]= "Translate: f";
$header[]= "Content-Type: text/xml";
curl_setopt( $ch, CURLOPT_HTTPHEADER, $header );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookiefile);
curl_setopt ($ch, CURLOPT_COOKIEFILE, $cookiefile);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result=curl_exec ($ch);
$responsecode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
Debugging:
-
* Trying x.x.x.x... * connected
-
* successfully set certificate verify locations:
-
* CAfile: /etc/pki/tls/certs/ca-bundle.
crt -
CApath: none
-
* SSL connection using RC4-MD5
-
* Server certificate:
-
* start date: 2007-11-28 15:29:10 GMT
-
* expire date: 2009-11-28 15:29:10 GMT
-
* issuer: /C=US/ST=Arizona/L=Scottsdale/
O=GoDaddy.com, Inc./OU=http://certificates. godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287 -
* SSL certificate verify ok.
-
> OPTIONS /exchange/ HTTP/1.1
-
User-Agent: Branchit Server Agent
-
Host: webmail.x.com
-
Accept: */*
-
Depth: 1
-
Translate: f
-
Content-Type: text/xml
-
-
< HTTP/1.1 401 Unauthorized
-
< Date: Tue, 09 Dec 2008 19:31:13 GMT
-
< Content-Length: 83
-
< Content-Type: text/html
-
< Server: Microsoft-IIS/6.0
-
< WWW-Authenticate: Negotiate
-
< WWW-Authenticate: NTLM
-
< WWW-Authenticate: Basic realm="webmail.x.com"
-
< X-Powered-By: ASP.NET
-
* Ignoring the response-body
-
* Issue another request to this URL: 'https://webmail.x.com/
exchange/ ' -
* Re-using existing connection! (#0) with host webmail.x.com
-
> OPTIONS /exchange/ HTTP/1.1
-
User-Agent: Server Agent
-
Host: webmail.x.com
-
Accept: */*
-
Depth: 1
-
Translate: f
-
Content-Type: text/xml
-
-
< HTTP/1.1 401 Unauthorized
-
< Date: Tue, 09 Dec 2008 19:31:14 GMT
-
< Content-Length: 83
-
< Content-Type: text/html
-
< Server: Microsoft-IIS/6.0
-
* gss_init_sec_context() failed: : Unknown code krb5 195* Authentication problem. Ignoring this.
-
< WWW-Authenticate: Negotiate
-
< WWW-Authenticate: NTLM
-
< WWW-Authenticate: Basic realm="webmail.x.com"
-
< X-Powered-By: ASP.NET
-
* Closing connection #0
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-12-21