#50717 [Ana->Fbk]: Slow download speed
ID: 50717
Updated by: jani@php.net
Reported By: abaddon_a2006 at yahoo dot com
-Status: Analyzed
+Status: Feedback
Bug Type: cURL related
Operating System: fedora 12
PHP Version: 5.3.1
-Assigned To:
+Assigned To: rasmus
Previous Comments:
------------------------------------------------------------------------
[2010-01-14 21:46:51] rasmus@php.net
I doubt this is a PHP issue, if it even is an issue at all. From the
PHP side there is no difference between a request with a cookie and one
without. That's all inside libcurl. Try emulating the same thing from
the command-line curl client with and without a cookie jar and see if
you see the same effect. I predict you will.
------------------------------------------------------------------------
[2010-01-12 10:59:56] abaddon_a2006 at yahoo dot com
curl 7.19.7 (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/3.12.4.5
zlib/1.2.3 libidn/1.9 libssh2/1.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp
sftp
Features: GSS-Negotiate IDN IPv6 Largefile SSL libz
------------------------------------------------------------------------
[2010-01-12 10:19:25] jani@php.net
What curl version have you compiled PHP with?
------------------------------------------------------------------------
[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] jani@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.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/50717
--
Edit this bug report at http://bugs.php.net/?id=50717&edit=1
Thread (10 messages)