Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
jmoshier #1
cferror and Server Name
Hello All,
We have an exception handler page that will email us the page the user was on
and the page the user was trying to get to.
My question is we have 2 servers a testing and the live one. The folder
structure is exactly the same on both.
When an error happens and we are emailed, it does not show which server the
error happened on. I have tried using getbasetemplate path but it just starts
with the c:
Does anyone know a way I can get the server name to output somewhere in the
email so we can tell if a users has a problem on a page or it is just us
messing around with the pages?
Thanks for the help in advance.
jlmoshier
jmoshier Guest
-
cferror not catching errors
I can't let you get away with that. There is definitely a problem with <cferror> in CF MX as I see it. I have the same or similar problem that was... -
cferror question??
Hi all... I am using cferror to catch errors in our site and am able to catch every type of error except for a "database" error. Here is what our... -
CFERROR and logging
I cannot get errors to be logged when using the cferror tag. When I add the cflog to the errorhandling file, it displays the output of the cflog... -
CFERROR
Hi. I am just testing a simple site to try cf. The header is in application.cfm and the fotter in OnRequestEnd.cfm The main page is the requested... -
cferror woes
Hello, I currently have cferror catching errors on a clients website which is running from our staging server. The client also has their own UAT... -
MattRobertson #2
Re: cferror and Server Name
<cfoutput>#cgi.server_name#</cfoutput>
Or better still
<cfif isdefined("form.ACode")><cfset form.ACode="[SCRUBBED]"></cfif>
<cflock scope="SERVER" type="READONLY" timeout="10">
<cfset variables.CFVer=Left(server.coldfusion.ProductVers ion,1)>
</cflock>
<cfloop
list="CFCATCH,ERROR,APPLICATION,ATTRIBUTES,CALLER, CGI,CLIENT,FORM,REQUEST,SESSI
ON,SERVER,THIS,THISTAG,URL,VARIABLES"
index="loopItem">
<cfif IsDefined("#loopItem#")>
<cfif variables.CFVer lt 6>
<br><br><cfoutput><b>#loopItem#</b></cfoutput>
<cfdump var="#Evaluate(loopItem)#">
<cfelse>
<cfdump var="#Evaluate(loopItem)#" label="#loopItem#">
</cfif>
</cfif>
</cfloop>
Get ready for a BIG dump if you use that one (trimming off the 'variables'
scope will remove all query output). And if you are running either CF5 or CF6+
you can shave off that cflock'd cfset and one of the two results of the cfif,
depending on your version.
HtH,
--Matt--
MSB Web Systems... [url]http://mysecretbase.com[/url]
"The mistake you make is in trying to figure it out."
- Tennessee Williams
MattRobertson Guest
-
jmoshier #3
Re: cferror and Server Name
Matt,
I totally forgot about the cgi variables. Thanks that worked perfect for me.
jlmoshier
jmoshier Guest



Reply With Quote

