From:             mfelden at gsd-web dot de
Operating system: windows 2000 server
PHP version:      4.3.2
PHP Bug Type:     *General Issues
Bug description:  php.exe consumes 100% cpu

Description:
------------
PHP is running on the local http-server IIS. A script loaded in IE 5
causes a new instance of php.exe running on the server. It instantly
consumes 100% of the cpu power. This blocks the server, so the query could
not be completed. The IIS sends a Timeout after 30 seconds. I can't change
it, due to the MMC which says, there is no IIS. Even after closing the
IE-Window php.exe is consuming 100% of the cpu power for the next say 5
minutes. During this php.exe dis- and appears in the process list again
and again. In php.ini php_iisfunc.dll is commented out.

It is no fun.

Reproduce code:
---------------
<html><head><title>Import</title></head>
<body><h3>Daten holen</h3>
<form action='daten.php' method="POST">
  <input name=ok type=submit value=OK>
</form></body></html>
<?php 
if($_POST['ok']){get_data();}
function get_data()
{ 
  $query =  "SELECT * FROM corpus WHERE gms is not null and id>590 and
id<691";        
        $result = query($query, $source);

        for($i = 0; $i < $result->rows; $i++)
        {
    $query = "UPDATE corpus SET strasse ='" . $result->data[$i]['field'] .
"' WHERE id = " . $result->data[$i]['id'];
        query($query);
                }               
        }    
}
function query($query)
{
  $link = dbx_connect (DBX_MSSQL, "1.2.3.4", "db", "user", "pwd",
DBX_PERSISTENT| DBX_RESULT_INFO) or die ("Fehler beim Verbinden");      
  $result = dbx_query($link, $query);
  dbx_close ($link);
  return $result;
}
?>


Expected result:
----------------
Query completed

Actual result:
--------------
Timeout after 30 sec

-- 
Edit bug report at http://bugs.php.net/?id=25859&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25859&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25859&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25859&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25859&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25859&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25859&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25859&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25859&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25859&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25859&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25859&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25859&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25859&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25859&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25859&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25859&r=float

Reply via email to