php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41343 FastCGI Server (Internal Server Error)
Submitted: 2007-05-10 01:33 UTC Modified: 2007-05-11 12:01 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: trustpunk at gmail dot com Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5.2.2 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: trustpunk at gmail dot com
New email:
PHP Version: OS:

 

 [2007-05-10 01:33 UTC] 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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-10 16:43 UTC] philip dot iezzi at onlime dot ch
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
 [2007-05-10 20:20 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2007-05-11 04:52 UTC] trustpunk at gmail dot com
I really do apologize for this but it seems that I'm longer having this problem. I downloaded PHP 5.2.2 again and now the problem went away. I don't have any backtrace created but if the problem happens again, I will let you know.

Kind regards, Josh
 [2007-05-11 12:01 UTC] tony2001@php.net
Please reopen the report if/when you have any additional information.
Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 18:01:30 2024 UTC