|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47461 file_get_contents()
Submitted: 2009-02-20 10:45 UTC Modified: 2009-02-28 01:00 UTC
Avg. Score:4.1 ± 0.8
Reproduced:7 of 7 (100.0%)
Same Version:1 (14.3%)
Same OS:3 (42.9%)
From: info at controlzeta dot net Assigned:
Status: No Feedback Package: Performance problem
PHP Version: 5.2CVS-2009-02-20 (CVS) OS: Linux 2.6.9-55.0.9 x86_64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-02-20 10:45 UTC] info at controlzeta dot net

The function consumes 100% cpu when external url not answering the request wiht normally. Example: server busy


La function file_get_contents('external_url') consume el 100% de cpu mientras espera la contestaci?n del otro servidor.Ejemplo: servidor ocupado.

Reproduce code:

//ini_set('max_execution_time',500); More time, More CPU 100%
$urlExternal = "";
$oneString = file_get_contents($urlExternal);
echo $oneString;


Expected result:
Get a string of the page request.

Actual result:
CPU of server 100% usage all the time of the script execution until waiting the external server aswering.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-20 11:56 UTC]
Please try using this CVS snapshot:
For Windows:

Works fine for me.
 [2009-02-28 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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 16:01:28 2024 UTC