home *** CD-ROM | disk | FTP | other *** search
- <HTML>
- <HEAD>
- <TITLE>ColdFusion Administrator - Debugging</TITLE>
- <META NAME="Author" CONTENT="Copyright 1996 Allaire Corp. All rights reserved.">
- <META NAME="Version" CONTENT="$Revision: 39 $ $Modtime: 11/23/98 9:21a $">
- </HEAD>
- <!--- General page formatting is controled by this template --->
- <cfinclude template="../formatting/header.cfm">
-
-
-
- <!--- Initialization/declarations --->
- <CFSET CFBRANCH = "HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion">
- <CFSET DEBUGBRANCH = "HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Debug">
- <CFSET IPBRANCH = #DEBUGBRANCH# & "\DebugIPList">
-
- <CFIF ParameterExists(FORM.WriteDebugInfo) IS "No"> <CFSET WriteDebugInfo = ""></CFIF>
- <CFIF ParameterExists(FORM.EnablePerfMon) IS "No"> <CFSET EnablePerfMon = ""></CFIF>
- <CFIF ParameterExists(FORM.EnableStackTrace) IS "No"> <CFSET EnableStackTrace = ""></CFIF>
- <CFIF ParameterExists(FORM.WriteBenchmarkingInfo) IS "No"> <CFSET WriteBenchmarkingInfo = ""></CFIF>
- <CFIF ParameterExists(FORM.WriteQueryInfo) IS "No"> <CFSET WriteQueryInfo = ""></CFIF>
- <CFIF ParameterExists(FORM.WriteSQLInfo) IS "No"> <CFSET WriteSQLInfo = ""></CFIF>
- <CFIF ParameterExists(FORM.DisplayTemplatePath) IS "No"> <CFSET DisplayTemplatePath = ""></CFIF>
-
-
- <!--- Update data? --->
- <CFIF ParameterExists( FORM.Apply)>
- <!--- Clear the whole branch --->
- <CFNewInternalRegistry ACTION=GET VARIABLE="DebugKeyExists" ENTRY="Debug" TYPE="Key" BRANCH="#CFBRANCH#">
- <CFIF ParameterExists(DebugKeyExists)>
- <CFNewInternalRegistry ACTION=DELETE ENTRY="Debug" TYPE="KEY" BRANCH="#CFBRANCH#">
- <CFNewInternalRegistry ACTION=SET ENTRY="Debug" TYPE="KEY" BRANCH="#CFBRANCH#">
- <CFNewInternalRegistry ACTION=SET ENTRY="DebugIPList" TYPE="KEY" BRANCH="#DEBUGBRANCH#">
- </CFIF>
-
- <!--- Update settings --->
- <CFNewInternalRegistry ACTION=SET ENTRY="WriteDebugInfo" VALUE="#ReplaceList(WriteDebugInfo & 'A','CHECKEDA,A','1,0')#" TYPE="STRING" BRANCH="#DebugBranch#" >
- <CFNewInternalRegistry ACTION=SET ENTRY="EnablePerfMon" VALUE="#ReplaceList(EnablePerfMon & 'A','CHECKEDA,A','1,0')#" TYPE="STRING" BRANCH="#DebugBranch#" >
- <CFNewInternalRegistry ACTION=SET ENTRY="EnableStackTrace" VALUE="#ReplaceList(EnableStackTrace & 'A','CHECKEDA,A','1,0')#" TYPE="STRING" BRANCH="#DebugBranch#" >
- <CFNewInternalRegistry ACTION=SET ENTRY="WriteBenchmarkingInfo" VALUE="#ReplaceList(WriteBenchmarkingInfo & 'A','CHECKEDA,A','1,0')#" TYPE="STRING" BRANCH="#DebugBranch#" >
- <CFNewInternalRegistry ACTION=SET ENTRY="WriteQueryInfo" VALUE="#ReplaceList(WriteQueryInfo& 'A','CHECKEDA,A','1,0')#" TYPE="STRING" BRANCH="#DebugBranch#" >
- <CFNewInternalRegistry ACTION=SET ENTRY="WriteSQLInfo" VALUE="#ReplaceList(WriteSQLInfo & 'A','CHECKEDA,A','1,0')#" TYPE="STRING" BRANCH="#DebugBranch#" >
- <CFNewInternalRegistry ACTION=SET ENTRY="DisplayTemplatePath" VALUE="#ReplaceList(DisplayTemplatePath & 'A','CHECKEDA,A','1,0')#" TYPE="STRING" BRANCH="#DebugBranch#" >
-
- <!--- Save the user-updated IP list. --->
- <CFLOOP INDEX="IP_ListElement" LIST="#RestrictedIPList#" DELIMITERS=",">
- <CFSET QuoteLessIP = "#Replace(IP_ListElement,'''','',"ALL")#">
- <CFNewInternalRegistry ACTION=SET BRANCH="#IPBranch#"
- ENTRY="#QuoteLessIP#"
- VALUE=""
- TYPE="STRING">
- </CFLOOP>
-
- <!---- Tell the engine to refresh from the registry ---->
- <CFSET bSuccess = cfusion_settings_refresh()>
- <CFLOCATION URL="index.cfm">
- <CFELSEIF ParameterExists( FORM.AddIP )>
- <CFINCLUDE TEMPLATE="addip.cfm">
-
- <CFELSEIF ParameterExists( FORM.RemoveIP )>
- <CFIF ParameterExists( AddedIPs )>
- <CFLOOP INDEX="Remove_IP" LIST="#AddedIPs#">
- <CFSET RestrictedIPList = ListDeleteAt(RestrictedIPList, ListFind(RestrictedIPList,'#Remove_IP#'))>
- </CFLOOP>
- </CFIF>
-
- <CFELSE>
- <!--- Get settings. --->
- <CFNewInternalRegistry ACTION=GET VARIABLE="WriteDebugInfo" ENTRY="WriteDebugInfo" TYPE="STRING" BRANCH="#DebugBranch#">
- <CFNewInternalRegistry ACTION=GET VARIABLE="EnablePerfMon" ENTRY="EnablePerfMon" TYPE="STRING" BRANCH="#DebugBranch#">
- <CFNewInternalRegistry ACTION=GET VARIABLE="EnableStackTrace" ENTRY="EnableStackTrace" TYPE="STRING" BRANCH="#DebugBranch#">
- <CFNewInternalRegistry ACTION=GET VARIABLE="WriteBenchmarkingInfo" ENTRY="WriteBenchmarkingInfo" TYPE="STRING" BRANCH="#DebugBranch#">
- <CFNewInternalRegistry ACTION=GET VARIABLE="WriteQueryInfo" ENTRY="WriteQueryInfo" TYPE="STRING" BRANCH="#DebugBranch#">
- <CFNewInternalRegistry ACTION=GET VARIABLE="WriteSQLInfo" ENTRY="WriteSQLInfo" TYPE="STRING" BRANCH="#DebugBranch#">
- <CFNewInternalRegistry ACTION=GET VARIABLE="DisplayTemplatePath" ENTRY="DisplayTemplatePath" TYPE="STRING" BRANCH="#DebugBranch#">
-
- <!--- Get checkbox values from settings --->
- <CFSET WriteDebugInfo = IIF( WriteDebugInfo IS 1, DE("CHECKED"), DE("") )>
- <CFSET EnablePerfMon = IIF( EnablePerfMon IS 1, DE("CHECKED"), DE("") )>
- <CFSET EnableStackTrace = IIF( EnableStackTrace IS 1, DE("CHECKED"), DE("") )>
- <CFSET WriteBenchmarkingInfo = IIF( WriteBenchmarkingInfo IS 1, DE("CHECKED"), DE("") )>
- <CFSET WriteQueryInfo = IIF( WriteQueryInfo IS 1, DE("CHECKED"), DE("") )>
- <CFSET WriteSQLInfo = IIF( WriteSQLInfo IS 1, DE("CHECKED"), DE("") )>
- <CFSET DisplayTemplatePath = IIF( DisplayTemplatePath IS 1, DE("CHECKED"), DE("") )>
-
- <!--- Get the IP list --->
- <CFNewInternalRegistry ACTION=GETALL BRANCH="#IPBranch#" NAME="GetIPList">
- <CFSET RestrictedIPList = QuotedValueList( GetIPList.Entry )>
- <!--- Filter out the key default value if exists --->
- <CFIF ListFind(RestrictedIPList,"'DEFAULT'") GT 0 >
- <CFSET RestrictedIPList = ListDeleteAt(RestrictedIPList, ListFind(RestrictedIPList,"'DEFAULT'"))>
- </CFIF>
- </CFIF>
-
- <!--- The output starts here. --->
- <CFOUTPUT><FONT SIZE="#Evaluate(2 + FONTSIZE)#" FACE="#FONTFACE#"><B>Debug Settings</B></FONT></CFOUTPUT>
-
- <CFOUTPUT>
- <FORM ACTION="index.cfm" METHOD="POST">
- <INPUT NAME="RestrictedIPList" TYPE="HIDDEN" VALUE="#RestrictedIPList#">
- <TABLE VALIGN="TOP">
-
- <!-- Checkboxes -->
-
- <TR>
- <TD VALIGN="TOP">
- <INPUT NAME="EnablePerfMon" TYPE="CHECKBOX" VALUE="CHECKED" #EnablePerfMon#>
- </TD>
- <TD>
- <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Enable performance monitoring</B>
- - allows the standard NT Performance Monitor application to display information about
- a running ColdFusion Application Server. On platforms that do not support the NT
- Performance Monitor, a command line utility, CFSTAT, is provided which will display
- the same information. (You must restart the ColdFusion Application Server
- in order for changes in this setting to take effect.)
- </FONT>
- </TD>
- <TR>
- <TD VALIGN="TOP">
- <INPUT NAME="EnableStackTrace" TYPE="CHECKBOX" VALUE="CHECKED" #EnableStackTrace#>
- </TD>
- <TD>
- <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Enable CFML stack trace</B>
- - in case of a CFML structured exception, fills in CFCATCH.TAGCONTEXT with
- information about the tags that were executing when ColdFusion detected the
- exception.
- </FONT>
- </TD>
- <TR>
- <TD VALIGN="TOP">
- <INPUT NAME="WriteDebugInfo" TYPE="CHECKBOX" VALUE="CHECKED" #WriteDebugInfo#>
- </TD>
- <TD>
- <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Show variables</B>
- - displays the names and values of all CGI, URL, form, and cookie variables.
- </FONT>
- </TD>
- <TR>
- <TD VALIGN="TOP">
- <INPUT NAME="WriteBenchmarkingInfo" TYPE="CHECKBOX" VALUE="CHECKED" #WriteBenchmarkingInfo#>
- </TD>
- <TD>
- <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Show processing time</B>
- - shows the time, in milliseconds, to process the entire page.
- </FONT>
- </TD>
- </TR>
- <TR>
- <TD VALIGN="TOP">
- <INPUT NAME="WriteSQLInfo" TYPE="CHECKBOX" VALUE="CHECKED" #WriteSQLInfo#>
- </TD>
- <TD>
- <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Show SQL and data source name</B>
- - permits the display of the data source name and the SQL
- statement in messages about database query errors.
- </FONT>
- </TD>
- <TR>
- <TD VALIGN="TOP">
- <INPUT NAME="WriteQueryInfo" TYPE="CHECKBOX" VALUE="CHECKED" #WriteQueryInfo#>
- </TD>
- <TD>
- <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Show query information</B>
- - displays the record count, processing time, and the SQL statement for each query executed.
- </FONT>
- </TD>
- </TR>
-
- <tr>
- <TD VALIGN="TOP">
- <INPUT NAME="DisplayTemplatePath" TYPE="CHECKBOX" VALUE="CHECKED" #DisplayTemplatePath#>
- </TD>
- <TD>
- <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#"><B>Display the template path in error messages</B>
- - ColdFusion's default error message displays the general identifier of the tag that suffered from an error,
- but does not display the template's file name. The template's file name is useful for debugging, but may be a
- security hazard because it displays information about a server's file structure.
- </FONT>
- </TD>
- </tr>
- </CFOUTPUT>
-
- <!-- Vertical spacer -->
- <TR><TD></TD>
- <TD><BR></TD>
- </TR>
- <TR>
- <TD></TD>
- <TD>
- <CFINCLUDE TEMPLATE="iplist.cfm">
- <!-- Buttons -->
- </TD>
- <TR>
- <TR>
- <TD></TD>
- <TD>
- <CFINCLUDE TEMPLATE="..\include\stdformbuttons.cfm">
- </TD>
- </TR>
-
- </TABLE>
- </FORM>
-
- <!--- This closes the page formatting template --->
- <CFINCLUDE TEMPLATE="../formatting/footer.cfm">
- </BODY>
- </HTML>
-