ID:               41343
 Comment by:       philip dot iezzi at onlime dot ch
 Reported By:      trustpunk at gmail dot com
 Status:           Open
 Bug Type:         CGI related
 Operating System: Windows XP
 PHP Version:      5.2.2
 New Comment:

Same problem here, PHP 5.2.2 as CGI crashes all the time.
I have encountered the problem under the following configurations:


Debian Linux (sarge)
PHP/CGI 5.2.2 & 4.4.7, compiled from sources
web application: SPIP 1.9 CMS

Debian Linux (etch)
PHP/FastCGI(fcgid) 5.2.2, compiled from sources
web application: Roundcube webmail (latest SVN checkout)


Downgrading back to PHP 5.2.1 solved all the issues.
I definitely need to get 5.2.2 running as a serious bug with FastCGI
was fixed (#40286). The current situation is pretty ugly, both versions
of PHP are buggy in their own way under CGI/FastCGI.

Thx!
Philip


Previous Comments:
------------------------------------------------------------------------

[2007-05-10 01:33:11] trustpunk at gmail dot com

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 this bug report at http://bugs.php.net/?id=41343&edit=1

Reply via email to