From: trustpunk at gmail dot com Operating system: Windows XP PHP version: 5.2.2 PHP Bug Type: CGI related Bug description: FastCGI Server (Internal Server Error)
Description: ------------ I run the FastCGI server C:\PHP5\php-cgi.exe -b 127.0.0.1:2700 When it becomes under too much load, it displays an Internal Server Error. Reproduce code: --------------- This code will cause the FastCGI Server to show an Internal Server Error. <?php if (class_exists("COM")) { $wmi = new COM("WinMgmts:\\\\."); $cpus = $wmi->InstancesOf("Win32_Processor"); $i = 1; // Use the while loop on PHP 4 and foreach on PHP 5 // while ($cpu = $cpus->Next()) { foreach ($cpus as $cpu) { echo "<p>Processor $i : " . $cpu->Name . " @ "; $clockSpeed = $cpu->CurrentClockSpeed; $cpuLoad = $cpu->LoadPercentage; echo $clockSpeed . " MHz (Load= " . $cpuLoad ."%)</p>"; $i++; } $uptime = 0; $systems = $wmi->InstancesOf("Win32_PerfRawData_PerfOS_System"); // Use the while loop on PHP 4 and foreach on PHP 5 // while ($system = $systems->Next()) { foreach ($systems as $system) { $PerfTimeStamp = $system->Timestamp_Object ; $PerfTimeFreq = $system->Frequency_Object ; $Counter = $system->SystemUpTime ; $UptimeInSec = ($PerfTimeStamp - $Counter)/$PerfTimeFreq ; $uptime = max($uptime, $UptimeInSec); } } else { return "<p>Your system does not support WMI!</p>"; } ?> Expected result: ---------------- I expect to see my Processors listed with some useful information. Actual result: -------------- Internal Server Error (500) -- Edit bug report at http://bugs.php.net/?id=41343&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41343&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41343&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41343&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41343&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41343&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41343&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41343&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41343&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41343&r=support Expected behavior: http://bugs.php.net/fix.php?id=41343&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41343&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41343&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41343&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41343&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41343&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41343&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41343&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41343&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41343&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41343&r=mysqlcfg