Bug #76438 [Opn->Fbk]: wrong curl_getinfo time values
| From: | mike@php.net | Date: | Tue, 26 Mar 2019 14:52:33 +0000 |
| Subject: | Bug #76438 [Opn->Fbk]: wrong curl_getinfo time values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-220191@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76438&edit=1
ID: 76438
Updated by: mike@php.net
Reported by: example1 at example2 dot com
Summary: wrong curl_getinfo time values
-Status: Open
+Status: Feedback
Type: Bug
Package: cURL related
Operating System: Windows 7.1
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
Previous Comments:
------------------------------------------------------------------------
[2018-06-09 20:31:43] example1 at example2 dot com
Description:
------------
curl_getinfo sometimes returns very big time values.
4295.139296, 4295.310296 and 4295.295296 are very frequent (about 57%).
All I have spotted were of format 4295.***296 .
Apache/2.4.27 (Win64) PHP/7.1.9.
Test script:
---------------
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://example.com');
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($curl, CURLOPT_TIMEOUT, 15);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_exec($curl);
$info = curl_getinfo($curl);
echo 'total_time = ' . $info['total_time'] . '<br>';
echo 'namelookup_time = ' . $info['namelookup_time'] . '<br>';
echo 'connect_time = ' . $info['connect_time'] . '<br>';
echo 'pretransfer_time = ' . $info['pretransfer_time'] .
'<br>';
echo 'starttransfer_time = ' . $info['starttransfer_time'] .
'<br>';
echo 'redirect_time = ' . $info['redirect_time'] . '<br>';
curl_close($curl);
?>
Expected result:
----------------
typical normal result:
total_time = 0.327
namelookup_time = 1.0E-6
connect_time = 0.171
pretransfer_time = 0.171
starttransfer_time = 0.327
redirect_time = 0
Actual result:
--------------
total_time = 4295.326296
namelookup_time = 0.015
connect_time = 4295.154296
pretransfer_time = 4295.154296
starttransfer_time = 4295.326296
redirect_time = 0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76438&edit=1