|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-08-10 05:16 UTC] jms18 at guinness dot som dot cwru dot edu
Here is the source:
<?
PrintHeader();
DisplayQueue();
PrintClose();
function PrintHeader()
{
print("<HTML>\n<HEAD>\n<TITLE>\nPHP Helpdesk v0.0.1 Alpha\n</TITLE></HEAD>\n<BODY>\n");
}
function PrintClose()
{
print("\n</BODY>\n</HTML>");
}
function ConnectDB($Server,$Database,$DBUser,$DBPsswrd)
{
$mssql_link = mssql_connect($Server,$DBUser,$DBPsswrd) or DIE("SERVER FAILED TO RESPOND.");
mssql_select_db($Database) or DIE("Database unavailable");
return $mssql_link;
}
function RunQuery($Query, $Fetch, $Link)
{
if ($Fetch == 1)
{
return mssql_fetch_row(mssql_query($Query,$Link));
}
else
{
return mssql_query($Query,$Link);
}
}
function OpenTable($Alignment,$ColNumber,$CellSpace,$Border,$CellPadding,$Width)
{
print("<TABLE ALIGN=$Alignment COLS=$ColNumber CELLSPACING=$CellSpace BORDER=$Border CELLPADDING = $CellPadding WIDTH=$Width>\n");
}
function DisplayQueue()
{
$MSsqlLink = ConnectDB("Server","Datbase","user","password");
$Result = RunQuery("select * from tbl_WO_Entry, tbl_WO_Description, tbl_WO_Classification where ((tbl_WO_Entry.WO_nos = tbl_WO_Description.WO_nos and tbl_WO_Entry.WO_nos = tbl_WO_Classification.WO_nos) and (not (tbl_WO_Entry.status = 3 and tbl_WO_Entry.status = 4 and tbl_WO_Entry.status = 5))) order by tbl_WO_Entry.Priority,tbl_WO_Entry.WO_nos",0,$MSsqlLink);
OpenTable("CENTER",5,0,1,0,"100%");
print("<TR>\n<TH WIDTH=\"5%\">WO#</TH>\n<TH WIDTH=\"10%\">User</TH>\n<TH WIDTH=\"5%\">Priority</TH>\n");
print("<TH WIDTH=\"60%\" ABBR>Description</TH>\n<TH WIDTH=\"10%\">Status</TH>\n</TR>\n");
$Number = mssql_num_rows($Result);
print("$Number<BR>");
while($WORS = mssql_fetch_row($Result))
{
PrintQueueRow($WORS[0],$WORS[1],$WORS[3],$WORS[5],$WORS[2]);
}
print("</TABLE>\n");
mssql_close();
}
function PrintQueueRow($WONos,$UserName,$Priority,$Description,$Status)
{
print("<TR>\n<TD>$WONos</TD>\n<TD>$UserName</TD>\n<TD>$Priority</TD>\n");
print("<TD>$Description</TD>\n<TD>$Status</TD>\n</TR>\n");
}
?>
Here is the backtrace:
cd htdocs[root@som00258 apache]# gdb /usr/local/apache/bin/httpd
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(no debugging symbols found)...
(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x80e4843 in zend_hash_index_find ()
(gdb)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
Here is a shorter script that produces the same results: <? print("<HTML>\n<HEAD>\n<TITLE>\nPHP Helpdesk v0.0.1 Alpha\n</TITLE></HEAD>\n<BODY>\n"); $MSsqlLink = mssql_connect("Server","User","password") or DIE("SERVER FAILED TO RESPOND."); mssql_select_db("Database") or DIE("Database unavailable"); $Result = mssql_query("select tbl_WO_Entry.WO_nos,tbl_WO_Entry.UserName,tbl_WO_Entry.Status,tbl_WO_Entry.Priority,tbl_WO_Description.Problem_description from tbl_WO_Entry, tbl_WO_Description where ((tbl_WO_Entry.WO_nos = tbl_WO_Description.WO_nos) and (not (tbl_WO_Entry.status = 3 and tbl_WO_Entry.status = 4 and tbl_WO_Entry.status = 5))) order by tbl_WO_Entry.Priority,tbl_WO_Entry.WO_nos",$MSsqlLink); print("<TABLE ALIGN=CENTER COLS=5 CELLSPACING=0 BORDER=1 CELLPADDING=0 WIDTH=\"100%\">\n"); print("<TR>\n<TH WIDTH=\"5%\">WO#</TH>\n<TH WIDTH=\"10%\">User</TH>\n<TH WIDTH=\"5%\">Priority</TH>\n"); print("<TH WIDTH=\"60%\" ABBR>Description</TH>\n<TH WIDTH=\"10%\">Status</TH>\n</TR>\n"); $WORS = mssql_fetch_row($Result); print("<TR>\n<TD>$WORS[0]</TD>\n<TD>$WORS[1]</TD>\n<TD>$WORS[3]</TD>\n"); print("<TD>$WORS[4]</TD>\n<TD>$WORS[2]</TD>\n</TR>\n"); $WORS = mssql_fetch_row($Result); print("<TR>\n<TD>$WORS[0]</TD>\n<TD>$WORS[1]</TD>\n<TD>$WORS[3]</TD>\n"); print("<TD>$WORS[4]</TD>\n<TD>$WORS[2]</TD>\n</TR>\n"); $WORS = mssql_fetch_row($Result); print("<TR>\n<TD>$WORS[0]</TD>\n<TD>$WORS[1]</TD>\n<TD>$WORS[3]</TD>\n"); print("<TD>$WORS[4]</TD>\n<TD>$WORS[2]</TD>\n</TR>\n"); $WORS = mssql_fetch_row($Result); print("<TR>\n<TD>$WORS[0]</TD>\n<TD>$WORS[1]</TD>\n<TD>$WORS[3]</TD>\n"); print("<TD>$WORS[4]</TD>\n<TD>$WORS[2]</TD>\n</TR>\n"); print("</TABLE>\n"); mssql_close(); print("\n</BODY>\n</HTML>"); ?>