Skip to main content
Participant
June 10, 2006
Answered

Programmatically access debugging IPs

I'm currently working for a company which has several CFMX 6.1 servers hosting in a shared environment. Until a few days ago, we were having a very poor time keeping the public facing servers up with no JRUN server errors the more than a day. We recently turned off debugging on ALL production systems, and this seems to have fixed the our issues. However, it would be nice to see the debugging information (limited by IP) without going into the administrator and turning debugging on.

What I'd like to know is if there is some way to do a call, or read in a file, that grabs the debug IPs from the CF admin site at runtime. I'd then have a <if></if> structure capture the CGI.REMOTE_ADDR of the client, and try to match against that list. If true, show the CGI, SERVER, APPLICATION... and so in at our custom error template.

Matthew Williams
This topic is closed to new replies. Start a new post to keep the conversation going.
OphbalanceCorrect answer
Participant
June 10, 2006
Great! That works a treat. So, I can just do:

2 replies

June 10, 2006
In CF6 you can use the service factory to turn debugging on and off and to manipulate the debugging IP's.
(CF7 has the much superior (and supported/official) Admin API.)

An introduction to the service factory is here: http://cfdj.sys-con.com/read/41652.htm

Working code that you can start with is here: http://www.cflib.org/udf.cfm?id=1030&enable=1
Translate
OphbalanceAuthorCorrect answer
Participant
June 10, 2006
Great! That works a treat. So, I can just do:
Translate