ID:               50717
 Updated by:       j...@php.net
 Reported By:      abaddon_a2006 at yahoo dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         cURL related
 Operating System: fedora 12
 PHP Version:      5.3.1
 New Comment:

What curl version have you compiled PHP with?


Previous Comments:
------------------------------------------------------------------------

[2010-01-11 16:02:15] abaddon_a2006 at yahoo dot com

here it is a code that reproduce the problem

$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, "name");
curl_setopt($ch, CURLOPT_URL,"http://url/login.php";);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'user=username&password=pass');

ob_start();      // prevent any output
curl_exec ($ch); // execute the curl command
ob_end_clean();  // stop preventing output

curl_close ($ch);
unset($ch);

$opt = array(
CURLOPT_RETURNTRANSFER => 1, 
CURLOPT_COOKIEFILE => "name", 
CURLOPT_USERAGENT => "Mozilla/5.001 (windows; U; NT4.0; en-US; rv:1.0)
Gecko/25250101",
CURLOPT_PORT => "80"
);
if i submit this code everything is ok
0.21246290206909 seconds this is the time response but if i add this
under it

   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, 'http://url');
   curl_setopt_array($ch,$opt);
   $content = curl_exec($ch);
   print_r(curl_getinfo($ch));
   curl_close($ch); 

here is what it does return and it's weird yesterday i had no problem
with namelookup_time and today it does seem that it's unable to
calculate it... 

Array ( [url] => http://url [content_type] => text/html; charset=utf-8
[http_code] => 200 [header_size] => 244 [request_size] => 227 [filetime]
=> -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] =>
5.878797 [namelookup_time] => 2.6E-5 [connect_time] => 0.06947
[pretransfer_time] => 0.069475 [size_upload] => 0 [size_download] =>
19463 [speed_download] => 3310 [speed_upload] => 0
[download_content_length] => -1 [upload_content_length] => 0
[starttransfer_time] => 5.74344 [redirect_time] => 0 ) This page was
created in 6.0242450237274 seconds

hope this will be fixed soon thank you

------------------------------------------------------------------------

[2010-01-10 22:35:20] j...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



------------------------------------------------------------------------

[2010-01-10 18:14:27] abaddon_a2006 at yahoo dot com

Description:
------------
If you use cURL to login and store a cookie with CURLOPT_COOKIEJAR,
"cookie"); and later retrieve the cookie with CURLOPT_COOKIEFILE the
download speed is very low i dont know why this is happening but it's
happening.
tested without cookie download speed is normal,but with cookie is
somewhere around 7KB maximum




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50717&edit=1

Reply via email to