home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Administrator / debugging / index.cfm (.txt) < prev    next >
Encoding:
ColdFusion Encrypted Template  |  1999-04-12  |  9.4 KB  |  208 lines

  1. <HTML>
  2. <HEAD>
  3.     <TITLE>ColdFusion Administrator - Debugging</TITLE>
  4.     <META NAME="Author" CONTENT="Copyright 1996 Allaire Corp. All rights reserved.">
  5.     <META NAME="Version" CONTENT="$Revision: 39 $ $Modtime: 11/23/98 9:21a $">
  6. </HEAD>
  7. <!--- General page formatting is controled by this template --->
  8. <cfinclude template="../formatting/header.cfm">
  9.  
  10.  
  11.  
  12. <!--- Initialization/declarations --->
  13. <CFSET CFBRANCH = "HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion">
  14. <CFSET DEBUGBRANCH = "HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Debug">
  15. <CFSET IPBRANCH = #DEBUGBRANCH# & "\DebugIPList">
  16.  
  17. <CFIF ParameterExists(FORM.WriteDebugInfo) IS "No">        <CFSET WriteDebugInfo         = ""></CFIF>
  18. <CFIF ParameterExists(FORM.EnablePerfMon) IS "No">        <CFSET EnablePerfMon         = ""></CFIF>
  19. <CFIF ParameterExists(FORM.EnableStackTrace) IS "No">    <CFSET EnableStackTrace         = ""></CFIF>
  20. <CFIF ParameterExists(FORM.WriteBenchmarkingInfo) IS "No">    <CFSET WriteBenchmarkingInfo = ""></CFIF>
  21. <CFIF ParameterExists(FORM.WriteQueryInfo) IS "No">        <CFSET WriteQueryInfo        = ""></CFIF>
  22. <CFIF ParameterExists(FORM.WriteSQLInfo) IS "No">        <CFSET WriteSQLInfo         = ""></CFIF>
  23. <CFIF ParameterExists(FORM.DisplayTemplatePath) IS "No">    <CFSET DisplayTemplatePath     = ""></CFIF>
  24.  
  25.  
  26. <!--- Update data? --->
  27. <CFIF ParameterExists( FORM.Apply)>    
  28.     <!--- Clear the whole branch  --->
  29.     <CFNewInternalRegistry ACTION=GET VARIABLE="DebugKeyExists" ENTRY="Debug" TYPE="Key" BRANCH="#CFBRANCH#">
  30.     <CFIF ParameterExists(DebugKeyExists)>
  31.         <CFNewInternalRegistry ACTION=DELETE         ENTRY="Debug"        TYPE="KEY"    BRANCH="#CFBRANCH#">
  32.         <CFNewInternalRegistry ACTION=SET         ENTRY="Debug"        TYPE="KEY"    BRANCH="#CFBRANCH#">
  33.         <CFNewInternalRegistry ACTION=SET         ENTRY="DebugIPList"    TYPE="KEY"    BRANCH="#DEBUGBRANCH#">
  34.     </CFIF>
  35.  
  36.     <!--- Update settings --->
  37.     <CFNewInternalRegistry ACTION=SET ENTRY="WriteDebugInfo"             VALUE="#ReplaceList(WriteDebugInfo & 'A','CHECKEDA,A','1,0')#"        TYPE="STRING"    BRANCH="#DebugBranch#" >
  38.     <CFNewInternalRegistry ACTION=SET ENTRY="EnablePerfMon"             VALUE="#ReplaceList(EnablePerfMon & 'A','CHECKEDA,A','1,0')#"        TYPE="STRING"    BRANCH="#DebugBranch#" >
  39.     <CFNewInternalRegistry ACTION=SET ENTRY="EnableStackTrace"             VALUE="#ReplaceList(EnableStackTrace & 'A','CHECKEDA,A','1,0')#"        TYPE="STRING"    BRANCH="#DebugBranch#" >
  40.     <CFNewInternalRegistry ACTION=SET ENTRY="WriteBenchmarkingInfo"     VALUE="#ReplaceList(WriteBenchmarkingInfo & 'A','CHECKEDA,A','1,0')#"     TYPE="STRING" BRANCH="#DebugBranch#" >
  41.     <CFNewInternalRegistry ACTION=SET ENTRY="WriteQueryInfo"             VALUE="#ReplaceList(WriteQueryInfo& 'A','CHECKEDA,A','1,0')#"         TYPE="STRING" BRANCH="#DebugBranch#" >
  42.     <CFNewInternalRegistry ACTION=SET ENTRY="WriteSQLInfo"                 VALUE="#ReplaceList(WriteSQLInfo & 'A','CHECKEDA,A','1,0')#"            TYPE="STRING" BRANCH="#DebugBranch#" >
  43.     <CFNewInternalRegistry ACTION=SET ENTRY="DisplayTemplatePath"         VALUE="#ReplaceList(DisplayTemplatePath & 'A','CHECKEDA,A','1,0')#"            TYPE="STRING" BRANCH="#DebugBranch#" >
  44.  
  45.     <!--- Save the user-updated IP list. --->
  46.     <CFLOOP INDEX="IP_ListElement" LIST="#RestrictedIPList#" DELIMITERS=",">
  47.         <CFSET QuoteLessIP = "#Replace(IP_ListElement,'''','',"ALL")#">
  48.         <CFNewInternalRegistry ACTION=SET BRANCH="#IPBranch#" 
  49.             ENTRY="#QuoteLessIP#"
  50.             VALUE="" 
  51.             TYPE="STRING">
  52.     </CFLOOP>
  53.  
  54.     <!---- Tell the engine to refresh from the registry ---->
  55.     <CFSET bSuccess = cfusion_settings_refresh()>
  56.     <CFLOCATION URL="index.cfm">
  57. <CFELSEIF ParameterExists( FORM.AddIP )>
  58.     <CFINCLUDE TEMPLATE="addip.cfm">
  59.     
  60. <CFELSEIF ParameterExists( FORM.RemoveIP )>
  61.     <CFIF ParameterExists( AddedIPs )>
  62.         <CFLOOP INDEX="Remove_IP" LIST="#AddedIPs#">
  63.                 <CFSET RestrictedIPList = ListDeleteAt(RestrictedIPList, ListFind(RestrictedIPList,'#Remove_IP#'))>
  64.         </CFLOOP>
  65.     </CFIF>
  66.  
  67. <CFELSE>
  68.     <!--- Get settings. --->
  69.     <CFNewInternalRegistry ACTION=GET VARIABLE="WriteDebugInfo"            ENTRY="WriteDebugInfo"            TYPE="STRING" BRANCH="#DebugBranch#">    
  70.     <CFNewInternalRegistry ACTION=GET VARIABLE="EnablePerfMon"            ENTRY="EnablePerfMon"            TYPE="STRING" BRANCH="#DebugBranch#">
  71.     <CFNewInternalRegistry ACTION=GET VARIABLE="EnableStackTrace"        ENTRY="EnableStackTrace"        TYPE="STRING" BRANCH="#DebugBranch#">
  72.     <CFNewInternalRegistry ACTION=GET VARIABLE="WriteBenchmarkingInfo"    ENTRY="WriteBenchmarkingInfo"    TYPE="STRING" BRANCH="#DebugBranch#">
  73.     <CFNewInternalRegistry ACTION=GET VARIABLE="WriteQueryInfo"            ENTRY="WriteQueryInfo"            TYPE="STRING" BRANCH="#DebugBranch#">
  74.     <CFNewInternalRegistry ACTION=GET VARIABLE="WriteSQLInfo"             ENTRY="WriteSQLInfo"            TYPE="STRING" BRANCH="#DebugBranch#">
  75.     <CFNewInternalRegistry ACTION=GET VARIABLE="DisplayTemplatePath"     ENTRY="DisplayTemplatePath"        TYPE="STRING" BRANCH="#DebugBranch#">
  76.     
  77.     <!--- Get checkbox values from settings --->
  78.     <CFSET WriteDebugInfo             = IIF( WriteDebugInfo IS 1, DE("CHECKED"), DE("") )>
  79.     <CFSET EnablePerfMon             = IIF( EnablePerfMon IS 1, DE("CHECKED"), DE("") )>
  80.     <CFSET EnableStackTrace             = IIF( EnableStackTrace IS 1, DE("CHECKED"), DE("") )>
  81.     <CFSET WriteBenchmarkingInfo     = IIF( WriteBenchmarkingInfo IS 1, DE("CHECKED"), DE("") )>
  82.     <CFSET WriteQueryInfo            = IIF( WriteQueryInfo IS 1, DE("CHECKED"), DE("") )>
  83.     <CFSET WriteSQLInfo             = IIF( WriteSQLInfo IS 1, DE("CHECKED"), DE("") )>
  84.     <CFSET DisplayTemplatePath        = IIF( DisplayTemplatePath IS 1, DE("CHECKED"), DE("") )>
  85.     
  86.     <!--- Get the IP list --->
  87.     <CFNewInternalRegistry ACTION=GETALL BRANCH="#IPBranch#" NAME="GetIPList">
  88.     <CFSET RestrictedIPList = QuotedValueList( GetIPList.Entry )>
  89.     <!--- Filter out the key default value if exists --->
  90.     <CFIF ListFind(RestrictedIPList,"'DEFAULT'") GT 0 >
  91.         <CFSET RestrictedIPList = ListDeleteAt(RestrictedIPList, ListFind(RestrictedIPList,"'DEFAULT'"))>
  92.     </CFIF>
  93. </CFIF>
  94.  
  95. <!--- The output starts here. --->
  96. <CFOUTPUT><FONT SIZE="#Evaluate(2 + FONTSIZE)#" FACE="#FONTFACE#"><B>Debug Settings</B></FONT></CFOUTPUT>
  97.  
  98. <CFOUTPUT>
  99. <FORM ACTION="index.cfm" METHOD="POST">
  100. <INPUT NAME="RestrictedIPList" TYPE="HIDDEN" VALUE="#RestrictedIPList#">
  101. <TABLE VALIGN="TOP">
  102.  
  103.     <!-- Checkboxes -->
  104.     
  105.     <TR>
  106.         <TD VALIGN="TOP">
  107.             <INPUT NAME="EnablePerfMon" TYPE="CHECKBOX" VALUE="CHECKED" #EnablePerfMon#>
  108.         </TD>
  109.         <TD>
  110.             <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Enable performance monitoring</B>
  111.             - allows the standard NT Performance Monitor application to display information about
  112.             a running ColdFusion Application Server. On platforms that do not support the NT
  113.             Performance Monitor, a command line utility, CFSTAT, is provided which will display
  114.             the same information. (You must restart the ColdFusion Application Server
  115.             in order for changes in this setting to take effect.)
  116.             </FONT>
  117.         </TD>
  118.     <TR>
  119.         <TD VALIGN="TOP">
  120.             <INPUT NAME="EnableStackTrace" TYPE="CHECKBOX" VALUE="CHECKED" #EnableStackTrace#>
  121.         </TD>
  122.         <TD>
  123.             <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Enable CFML stack trace</B>
  124.             - in case of a CFML structured exception, fills in CFCATCH.TAGCONTEXT with
  125.             information about the tags that were executing when ColdFusion detected the
  126.             exception.
  127.             </FONT>
  128.         </TD>
  129.     <TR>
  130.         <TD VALIGN="TOP">
  131.             <INPUT NAME="WriteDebugInfo" TYPE="CHECKBOX" VALUE="CHECKED" #WriteDebugInfo#>
  132.         </TD>
  133.         <TD>
  134.             <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Show variables</B>
  135.             - displays the names and values of all CGI, URL, form, and cookie variables.
  136.             </FONT>
  137.         </TD>
  138.     <TR>
  139.         <TD VALIGN="TOP">
  140.             <INPUT NAME="WriteBenchmarkingInfo" TYPE="CHECKBOX" VALUE="CHECKED" #WriteBenchmarkingInfo#>
  141.         </TD>
  142.         <TD>
  143.             <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Show processing time</B>
  144.             - shows the time, in milliseconds, to process the entire page.
  145.             </FONT>
  146.         </TD>
  147.     </TR>
  148.     <TR>
  149.         <TD VALIGN="TOP">
  150.             <INPUT NAME="WriteSQLInfo" TYPE="CHECKBOX" VALUE="CHECKED" #WriteSQLInfo#>
  151.         </TD>
  152.         <TD>
  153.             <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Show SQL and data source name</B>
  154.             - permits the display of the data source name and the SQL 
  155.             statement in messages about database query errors.
  156.             </FONT>
  157.         </TD>
  158.     <TR>
  159.         <TD VALIGN="TOP">
  160.             <INPUT NAME="WriteQueryInfo" TYPE="CHECKBOX" VALUE="CHECKED" #WriteQueryInfo#>
  161.         </TD>
  162.         <TD>
  163.             <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Show query information</B>
  164.             - displays the record count, processing time, and the SQL statement for each query executed.
  165.             </FONT>
  166.         </TD>
  167.     </TR>
  168.  
  169.     <tr>
  170.     <TD VALIGN="TOP">
  171.             <INPUT NAME="DisplayTemplatePath" TYPE="CHECKBOX" VALUE="CHECKED" #DisplayTemplatePath#>
  172.         </TD>
  173.         <TD>
  174.             <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Display the template path in error messages</B>
  175.             - ColdFusion's default error message displays the general identifier of the tag that suffered from an error, 
  176.             but does not display the template's file name. The template's file name is useful for debugging, but may be a 
  177.             security hazard because it displays information about a server's file structure. 
  178.             </FONT>
  179.         </TD>
  180.     </tr>
  181.     </CFOUTPUT>
  182.  
  183.     <!-- Vertical spacer -->
  184.     <TR><TD></TD>
  185.         <TD><BR></TD>
  186.     </TR>
  187.     <TR>
  188.         <TD></TD>
  189.         <TD>
  190.             <CFINCLUDE TEMPLATE="iplist.cfm">    
  191.             <!-- Buttons -->
  192.         </TD>
  193.     <TR>
  194.     <TR>
  195.         <TD></TD>
  196.         <TD>
  197.             <CFINCLUDE TEMPLATE="..\include\stdformbuttons.cfm">
  198.         </TD>
  199.     </TR>
  200.  
  201. </TABLE>
  202. </FORM>
  203.  
  204. <!--- This closes the page formatting template --->
  205. <CFINCLUDE TEMPLATE="../formatting/footer.cfm">
  206. </BODY>
  207. </HTML>
  208.