php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #36537 curl_multi_info_read function always return null
Submitted: 2006-02-26 20:49 UTC Modified: 2016-07-04 13:31 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: smserg at bk dot ru Assigned: cmb (profile)
Status: Closed Package: *General Issues
PHP Version: 5.1.2 OS: Windows 2000 sp4
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: smserg at bk dot ru
New email:
PHP Version: OS:

 

 [2006-02-26 20:49 UTC] smserg at bk dot ru
Description:
------------
curl_multi_info_read function always return null

Reproduce code:
---------------
<?php
$connomains = array(
   "http://www.cnn.com/",
   "http://www.canada.com/",
   "http://www.yahoo.com/"
   );

$mh = curl_multi_init();

foreach ($connomains as $i => $url) {
       $conn[$i]=curl_init($url);
       curl_setopt($conn[$i],CURLOPT_RETURNTRANSFER,1);
       curl_multi_add_handle ($mh,$conn[$i]);
}

do { 
	$n=curl_multi_exec($mh,$active); 
	var_dump(curl_multi_info_read($mh));
} while ($active);

foreach ($connomains as $i => $url) {
       $res[$i]=curl_multi_getcontent($conn[$i]);
       curl_close($conn[$i]);
}

var_dump(curl_multi_info_read($mh));

?>

Expected result:
----------------
Should be printed info about transfers

Actual result:
--------------
'null' values printed

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-26 21:11 UTC] mike@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

See the second example at http://php.net/curl_multi_exec
 [2006-03-08 15:32 UTC] smserg at bk dot ru
I found nothing about how to get transfers, which has been finished. I want to remove them from multi handler and add new single handler.
 [2006-03-08 15:33 UTC] smserg at bk dot ru
I found this in source code, i think this is a bug

PHP_FUNCTION(curl_multi_info_read)
{
	zval      *z_mh;
	php_curlm *mh;
	CURLMsg   *tmp_msg;
	int        queued_msgs;

	/* XXX: Not Implemented */
	return;
 [2006-03-12 22:32 UTC] mike@php.net
Reclassifying as feature request.
 [2014-10-26 23:32 UTC] php at mcq8 dot be
This can be closed as it has been implemented in php 5.2
 [2016-07-04 13:31 UTC] cmb@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: cmb
 [2016-07-04 13:31 UTC] cmb@php.net
> This can be closed as it has been implemented in php 5.2

Actually, it appears to have already been implemented in the
PHP-5.0 branch[1], but anyway, thanks for noticing! :)

[1] <https://github.com/php/php-src//blob/PHP-5.0/ext/curl/multi.c#L208>
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 13 17:01:33 2025 UTC