curl error : 52 - help
2006-10-02 17:43:24 GMT
-----------
Details of the Error:
======================
cURL error number :52
cURL error:error Empty reply from server* Closing connection #0 { which means, "Nothing was returned from the server "}
1) The Request is same as Browser Request
2) There is a correct redirection by server to GET "https://abc.def.ghi/ABC/Upload.asp?pqr=2"
But instead of Getting https://abc.def.ghi/ABC/Upload.asp?pqr=2 there is error as mentioned above
b)Is it that test.php takes longer time to run and the curl process returns before it finishes?
If so, how can we delay the curl execution-time?
c)Is it a problem at server - end? unfortunately, i donot have access to the server logs.
Please provide any help / suggestion if someone had this problem.
LP
Here's the 'Script' :
--------------------
echo " ENTER #######";
//POSTING to https://abc.def.ghi/ABC/Upload.asp?pqr=1
$URL = "https://abc.def.ghi/ABC/Upload.asp?pqr=1";
$reffer ="https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp";
$POSTFIELDS="txtLines=0&optType=1&Delimiter=%2C&txtDelimiter=&Qualifier=%22&txtQualifier=&cmdSubmit.x=54&cmdSubmit.y=20";
curl_setopt($ch, CURLOPT_URL,$URL);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_REFERER, $reffer);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
//output to file
$fp = fopen ($file, "w");
curl_setopt ($ch , CURLOPT_FILE, $fp);
//execute
$result =curl_exec ($ch );
print_r(curl_getinfo($ch));
echo "\n\ncURL error number:" .curl_errno($ch);
echo "\n\ncURL error:" . curl_error($ch);
curl_close ($ch );
fclose ($fp);
--------------------
========== BROWSER TRACE ===========================
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
Referer: https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Host: abc.def.ghi
Content-Length: 124
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASP.NET_SessionId=oqsrg0fzyi04l255yludwi55; ASPSESSIONIDQQQBBDAQ=FJMFABKCPBLBDKEJDOACACMC
Connection: close
Date: Fri, 29 Sep 2006 22:36:04 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Location: Upload.asp?pqr=2
Content-Length: 144
Content-Type: text/html
Cache-control: private
<body><h1>Object Moved</h1>This object may be found <a HREF="Upload.asp?pqr=2">here</a>.</body>
##############################################################################################
ENTER STEP #######*
About to connect() to abc.def.ghi port 443
* Trying 167.196.94.203... * connected
* Connected to abc.def.ghi (aaa.bbb.cc.ddd) port 443
* SSL connection using DES-CBC3-MD5
> POST /ABC/Upload.asp?pqr=1 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1
.4322)
Host: abc.def.ghi
Accept: */*
Referer: https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp
Cookie: ASPSESSIONIDQQQBBDAQ=KJMFABKCLGPICEBANFDBLFCH; ASP.NET_SessionId=isliqa4
5maky2hejbpr1tw55
Content-Length: 124
Content-Type: application/x-www-form-urlencoded
< Connection: close
< Date: Sat, 30 Sep 2006 00:04:18 GMT
< Server: Microsoft-IIS/6.0
< X-Powered-By: ASP.NET
< Location: Upload.asp?pqr=2
< Content-Length: 144
< Content-Type: text/html
< Cache-control: private
* Closing connection #0
* Issue another request to this URL: 'https://abc.def.ghi/ABC/Upload.asp?pqr=2'
* Disables POST, goes with GET
* About to connect() to abc.def.ghi port 443
* Trying aaa.bbb.cc.ddd... * connected
* Connected to abc.def.ghi (aaa.bbb.cc.ddd) port 443
* SSL re-using session ID
* SSL connection using DES-CBC3-MD5
> GET /ABC/Upload.asp?pqr=2 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1
.4322)
Host: abc.def.ghi
Accept: */*
Referer: https://abc.def.ghi/ABC/Upload.asp?frompage=fromaspnet.asp
Cookie: ASPSESSIONIDQQQBBDAQ=KJMFABKCLGPICEBANFDBLFCH; ASP.NET_SessionId=isliqa4
5maky2hejbpr1tw55
* Connection #0 to host abc.def.ghi left intact
Array
(
[url] => https://abc.def.ghi/ABC/Upload.asp?pqr=2
[content_type] => text/html
[http_code] => 302
[header_size] => 240
[request_size] => 905
[filetime] => -1
[ssl_verify_result] => 20
[redirect_count] => 1
[total_time] => 1.422
[namelookup_time] => 0
[connect_time] => 0.094
[pretransfer_time] => 0.281
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 144
[upload_content_length] => 0
[starttransfer_time] => 0.5
[redirect_time] => 0.922
)
cURL error number:52
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
RSS Feed