|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42531 Too many curl_copy_handle() calls causes a crash
Submitted: 2007-09-03 13:06 UTC Modified: 2007-11-24 01:00 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: nicolac76 at yahoo dot fr Assigned:
Status: No Feedback Package: cURL related
PHP Version: 5.2.4 OS: Windows XP
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-09-03 13:06 UTC] nicolac76 at yahoo dot fr
If we doing a for on a curl_multi_add_handle, Apache shut down without reason...
We can do 127 time, but no 128 (0111 111b)...
The problem come from the function not from the variable $i !

Reproduce code:
$ch = curl_init('');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
for($i = 1; $i <= 128; $i++)
 $conn[$i] = curl_copy_handle($ch);
 curl_multi_add_handle ($mh,$conn[$i]);

Expected result:
No error

Actual result:
An error


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-03 13:29 UTC]
I just have to ask: WHY do you do something like this anyway?!
 [2007-09-03 13:46 UTC] nicolac76 at yahoo dot fr
I change only the post options...
I need too read many time the same page with different post...
 [2007-11-16 14:23 UTC]
Please try using this CVS snapshot:
For Windows (zip):

For Windows (installer):

I fixed a related bug in curl_copy_handle(), please try the snapshot to see if it caused this bug too.
 [2007-11-24 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Jun 07 13:03:43 2023 UTC