From: info at controlzeta dot net
Operating system: Linux 2.6.9-55.0.9 x86_64
PHP version: 5.2CVS-2009-02-20 (CVS)
PHP Bug Type: Performance problem
Bug description: file_get_contents()
Description:
------------
ENGLISH:
The function consumes 100% cpu when external url not answering the request
wiht normally. Example: server busy
SPANISH:
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:
---------------
<?php
//ini_set('max_execution_time',500); More time, More CPU 100%
$urlExternal =
"http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=EUR&ToCurrency=USD";
$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.
--
Edit bug report at http://bugs.php.net/?id=47461&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47461&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47461&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47461&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47461&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=47461&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47461&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=47461&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=47461&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=47461&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=47461&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=47461&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=47461&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=47461&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47461&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47461&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47461&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=47461&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=47461&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=47461&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=47461&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=47461&r=mysqlcfg