Bug #1781: PHP hangs and causes 100% CPU usage for over 5 mins.
| From: | C dot Just at its dot uq dot edu dot au | Date: | Wed, 21 Jul 1999 06:05:31 +0000 |
| Subject: | Bug #1781: PHP hangs and causes 100% CPU usage for over 5 mins. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8840@lists.php.net to get a copy of this message | ||
From: C.Just@its.uq.edu.au
Operating system: NT 4.0 latest service packs.
PHP version: 3.0.11
PHP Bug Type: Performance problem
Bug description: PHP hangs and causes 100% CPU usage for over 5 mins.
PHP 3.09 doesn't seem to have this problem so we have reverted back to it. But there are some
functions in 3.0.11 that we do rely upon as well.
PHP 3.0.11 causes the CPU usage to jump to 100% when we are including other files from
external/local pages.
We need to do this when including sections of ASP pages within our existing pages as this is not
possible with ASP.
I would like to rewrite these ASP pages in PHP but it is beyond my control.
Here are the two methods I tried to use which caused the problems.
--------------------------
// INCLUDE THE EVENTS PAGE AND SEND ON ANY $QUERY_STRING VARIABLES SENT TO THIS PAGE.
$fp = fopen("http://".$HTTP_HOST."/news/events/c_public.asp?deptid=16&disptype=13&ahead_date=60&children=1&catid=9"
,"r");
while ( $val = fgets($fp, 512))
echo "$val \n";
--------------------------
This method causes PHP to flatline the server.
--------------------------
// INCLUDE THE EVENTS PAGE AND SEND ON ANY $QUERY_STRING VARIABLES SENT TO THIS PAGE.
$fp = file("http://".$HTTP_HOST."/news/events/c_public.asp?deptid=16&disptype=13&ahead_date=60&children=1&catid=9","r");
for($i=0; $i<count($fp); $i++)
echo $fp[$i]."\n";
--------------------------
As does the one above.
Also will there be any further versions of PHP3.0.11 now that PHP4 Beta has been released?