php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11788 CGI-Error and 502 Bad Gateway
Submitted: 2001-06-28 18:33 UTC Modified: 2002-06-18 18:36 UTC
From: theo dot schoeberl at tssystems dot de Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.0.5 OS: Windows 2000
Private report: No CVE-ID: None
 [2001-06-28 18:33 UTC] theo dot schoeberl at tssystems dot de
We have the same problem as bug number #9852, running this small script:

<?php
// user_error ("Starting whoonline.php");	
$TEST = false;
$RELOAD_TIME = 900; // 15 Minuten
//  Terminate Process!!!
function Terminate ($ODBCConn) {
	mssql_query("COMMIT", $ODBCConn);
	mssql_close($ODBCConn); 
	exit;
}
if (isset($HTTP_ENV_VARS["QUERY_STRING"])) {
	parse_str($HTTP_ENV_VARS["QUERY_STRING"]);
}
//  Wurde SiteID als Argument uebergeben? ... nein, Ende!
if (!isset($sid)) {
	exit;
}
if ($TEST == true) {
	if ($sid != "???????????")
		exit;
}
$SiteID = $sid;
// user_error ("SiteID=" . $sid);
$ODBCConn = mssql_connect("????????","??????","????????");
mssql_select_db("??????????",$ODBCConn);
mssql_query("BEGIN TRANSACTION", $ODBCConn);
$gTIME = time();
$lTimeLimit = $gTIME - $RELOAD_TIME;  // 15 Minuten
$SQL = "SELECT * FROM Reloads WHERE SiteID = " . $SiteID;
$SQL .= " AND TimeValue >= " . $lTimeLimit;
$rs = mssql_query($SQL, $ODBCConn);
$i = mssql_num_rows($rs);
if (isset($offset)) {
	if ($i == 0)
		$i = 1;
}
if ($TEST == false) {
    $strCount = str_pad($i, 6, "0", STR_PAD_LEFT);
    $width = strlen($strCount) * ImageFontWidth(4);
	$hImg = ImageCreateFromPNG("images/onlcnt.png");
	$clrFg = ImageColorresolve($hImg, 255, 206, 102);
	$clrFg = $clrFg * -1;
	ImageTTFText($hImg, 12, 0, 35, 24, $clrFg, "images/Tahomabd.ttf", $strCount);
	header("Content-type: image/gif");
	ImagePNG($hImg);
	ImageDestroy($hImg);
}
// user_error ("Leaving whoonline.php");
Terminate($ODBCConn);
?>

Note: Personal data are changed to ?

Is it a timing problem?

Hardware/Software:
   Web server:
      Win2000 Server (with SP1)
      IIS 5.0
      PHP 4.0.5 (CGI mode)

   Database server:
      Win2000 Server (with SP1)
      MS-SQL 2000

   Client:
      Win2000 Professional SP1
      IE 5.5 SP1

Is anybody working on this problem?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-02 16:22 UTC] k.schroeder@php.net
Same problem as #9852.

Regards, Kai
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 30 22:01:28 2024 UTC