15 Replies - 2754 Views - Last Post: 16 January 2012 - 12:43 PM
#1
ColdFusion/Railo Debuging Display
Posted 13 January 2012 - 05:30 PM
Any help would be greatly appreciated.
Replies To: ColdFusion/Railo Debuging Display
#2
Re: ColdFusion/Railo Debuging Display
Posted 13 January 2012 - 11:50 PM
Just like CF has a CF Admin where you can set the various aspects of the ColdFusion server, Railo appears to have a global Server Administrator that can control debug settings.
#3
Re: ColdFusion/Railo Debuging Display
Posted 14 January 2012 - 08:22 AM
Would there be a way to use a <cfif> tag to check the ip address, and put the debugging in there. then the debugging page would only display on that computer.
I would really like to have debugging, but if I have to turn it off, I can do that.
#4
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 06:21 AM
If you want to be more clever, try seeing if you can stick it into the onRequestStart method so it's called by each .cfm as they're loaded.
The conditional if would be for something like "if the user is from XXX IP" or "if the user has X cookie"...that kind of thing. Stuff only you as the developer could might have.
#5
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 07:25 AM
<cfoutput>#CGI.REMOTE_ADDR#</cfoutput>but when i try to use it in the debugging display, I get an error.
<cfoutput> <cfif #CGI.REMOTE_ADDR# = 191.168.1.104> <cfadmin action="printDebug"> </cfif> </cfoutput>
But when i use this code, I get the error:
invalid variable declaration [2]
Does anyone know why this is happening.
#6
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 07:34 AM
jk145, on 16 January 2012 - 07:25 AM, said:
<cfoutput>#CGI.REMOTE_ADDR#</cfoutput>but when i try to use it in the debugging display, I get an error.
<cfoutput> <cfif #CGI.REMOTE_ADDR# = 191.168.1.104> <cfadmin action="printDebug"> </cfif> </cfoutput>
But when i use this code, I get the error:
invalid variable declaration [2]
Does anyone know why this is happening.
I tried retyping the code, and am now getting
there is no property with name [1]
#7
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 07:46 AM
jk145, on 16 January 2012 - 09:25 AM, said:
<cfoutput>#CGI.REMOTE_ADDR#</cfoutput>but when i try to use it in the debugging display, I get an error.
<cfoutput> <cfif #CGI.REMOTE_ADDR# = 191.168.1.104> <cfadmin action="printDebug"> </cfif> </cfoutput>
But when i use this code, I get the error:
invalid variable declaration [2]
Does anyone know why this is happening.
Yep. Common mistake with CFIF. Can't confuse the "=" with "EQ" for CFIF. I don't know about CFADMIN (appears to be a Railo-specific tag) but the CFIF statement is prolly broken (or at least it would be if it were Adobe or BlueDragon CF).
#8
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 08:26 AM
Craig328, on 16 January 2012 - 07:46 AM, said:
jk145, on 16 January 2012 - 09:25 AM, said:
<cfoutput>#CGI.REMOTE_ADDR#</cfoutput>but when i try to use it in the debugging display, I get an error.
<cfoutput> <cfif #CGI.REMOTE_ADDR# = 191.168.1.104> <cfadmin action="printDebug"> </cfif> </cfoutput>
But when i use this code, I get the error:
invalid variable declaration [2]
Does anyone know why this is happening.
Yep. Common mistake with CFIF. Can't confuse the "=" with "EQ" for CFIF. I don't know about CFADMIN (appears to be a Railo-specific tag) but the CFIF statement is prolly broken (or at least it would be if it were Adobe or BlueDragon CF).
When I try <cfif #CGI.USER_ADDR# EQ 192.168.1.101>
I get the error:
there is no property with name [1]
#9
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 08:33 AM
<cfif CGI.USER_ADDR EQ "192.168.1.101">
#10
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 10:39 AM
#11
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 10:46 AM
jk145, on 16 January 2012 - 12:39 PM, said:
Ugh! Yep, there wouldn't be. My guess is that what you're seeing is a Railo version of "variable doesn't exist" message and that would be because cgi.user_addr prolly doesn't exist.
Try using CGI.REMOTE_ADDR instead. You can also do a dump of the CGI scope to see what is available to Railo.
<cfdump var="#cgi#">
#12
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 10:56 AM
Craig328, on 16 January 2012 - 10:46 AM, said:
jk145, on 16 January 2012 - 12:39 PM, said:
Ugh! Yep, there wouldn't be. My guess is that what you're seeing is a Railo version of "variable doesn't exist" message and that would be because cgi.user_addr prolly doesn't exist.
Try using CGI.REMOTE_ADDR instead. You can also do a dump of the CGI scope to see what is available to Railo.
<cfdump var="#cgi#">
After trying <cfif CGI.REMOTE_ADDR EQ "192.168.1.101"> (which it is, I can output that onto a page and it works perfectly, giving me the correct IP address) it still gives the same message.
The interesting thing is that whatever is on line 2 throws the error. Even if there is only one line in the .cfm page (the way it started) it throws an error for line 2:
there is no property with name [1]
The error occurred in /opt/railo/tomcat/webapps/ROOT/WEB-INF/railo/context/templates/debugging/debugging.cfm: line 2
1: <cfadmin action="printDebug">
I am confused.
#13
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 11:19 AM
I also have it dumping all of the variables, so that I can see them.
<cfif CGI.REMOTE_ADDR EQ "192.168.1.101"> <cfadmin action="printDebug"> <cfdump var="#FORM#" label="Form" expand="no"> <cfdump var="#URL#" label="URL" expand="no"> <cfdump var="#SESSION#" label="Session" expand="no"> <cfdump var="#APPLICATION#" label="Application" expand="no"> <cfdump var="#CGI#" label="CGI" expand="no"> <cfdump var="#CLIENT#" label="Client" expand="no"> <cfdump var="#REQUEST#" label="Request" expand="no"> <cfdump var="#SERVER#" label="Server" expand="no"> </cfif>
The CFADMIN tag is the Railo tag to output debugging.
Thanks for your help.
#14
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 11:31 AM
Try doing a CFTRY/CFCATCH for pages that throw errors and in the CFCATCH block do a CFDUMP of the cfcatch scope and see how you do.
#15
Re: ColdFusion/Railo Debuging Display
Posted 16 January 2012 - 12:12 PM
|
|

New Topic/Question
Reply



MultiQuote




|