|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-10 16:43 UTC] philip dot iezzi at onlime dot ch
[2007-05-10 20:20 UTC] tony2001@php.net
[2007-05-11 04:52 UTC] trustpunk at gmail dot com
[2007-05-11 12:01 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 21:00:02 2025 UTC |
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)