From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version: 4.0.5
PHP Bug Type: IIS related
Bug description: CGI-Error and 502 Bad Gateway
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?
--
Edit Bug report at: http://bugs.php.net/?id=11788&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]