Just discovered something that strikes me as _really_ odd.

I began developing a small application and defined an application.cfm file
that only contained a couple of constants (in the variables scope).
Something like:

<cfset logdir = "d:\logs">
<cfset cflf = Chr(13) & Chr(10)>

Now the first thing I had to do was run a small template that hashed through
about 30,000 text files and made entries into a database.  After some
preliminary testing, it looked like the script would take 30 to 45 minutes
to run.  No problem.  I launched it with a sufficiently large RequestTimeout
set in the URL and began to work on some other parts of the application.

After some more work I realized I didn't need an application.cfm file for
this small app, and indeed I wanted to use the application.cfm in the
directory immediately above my app.  I still needed the constants defined,
so I renamed 'application.cfm' to 'globals.cfm' on the server, intending to
include the file at the top of all templates.

About 10 seconds later, in the browser window running my 45 minute template,
an error pops up saying the variable 'logdir' is no longer defined.  I can't
imagine how, after running for ten minutes, a variable in the variables
scope should suddenly become undefined.  Any reasonable explanations?  This
seems really strange, as I thought application.cfm was simply included at
the top of each template and executed once.  The template being run
contained no cfincludes and no references to custom tags.

Jim


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to