Oops, sorry for the last send, itchy trigger finger. :)
This variable data caching is a problem common to
Apache::ASP and modperl in general. "use strict"
programming tends to help, as it requires explicit
variable initialization or declaration.
To do "use strict" for all your Apache::ASP scripts,
turn on the config:
PerlSetVar UseStrict 1
This is documented at:
http://www.apache-asp.org/config.html#UseStrict
This problem can also occur with the "my closure"
problem, documented in the mod_perl guide at:
http://perl.apache.org/guide/perl.html#my_Scoped_Variable_in_Nested_S
To avoid this, I would highly recommend not declaring
subroutines in your ASP scripts, and have those subroutines
in your global.asa or normal perl library. Apache::ASP
scripts are compiled as perl subroutines, so embeded
subroutines are prone to this behavior.
--Joshua
_________________________________________________________________
Joshua Chamas Chamas Enterprises Inc.
NodeWorks >> free web link monitoring Huntington Beach, CA USA
http://www.nodeworks.com 1-714-625-4051
"Demetrios C. Christopher" wrote:
>
> Hello and thanks in advance for any help.
>
> I am running Apache Stronghold 2.4.2 with modperl 1.21 and Apache::ASP 0.18
> (just recently upgraded to the latest - 2.03 I believe - but the problem was
> intermittent so I wanted to still check with the forum). Sure, pretty much
> everything could use an update and within the next couple of months I plan
> to do so but this software resides on a production box so there's little
> room
> for mishaps. I am waiting to install all the newest software on a new box
> and
> then transfer control.
>
> So, as the subject line states, the variables in my .asp's tend to retain
> the
> values used in previous script runs. If I leave stronghold going for a
> while
> without a restart, I can go to one of the forms, load it (initially
> everything
> should be blank) and then see someone else's info already filled out. By
> the
> way, these forms that I wrote (eg. a registration form) are forms that will
> initially print out the empty form and then upon submission do data
> validations
> and reprint the form (prefilling whatever passed the validation). The same
> script handles everything. I'm sure I didn't invent this but I just wanted
> to
> make sure everyone got the flow of the code. No criticism please, this code
> works great (prev. an IIS/ASP developer) and it's easy to maintain and
> duplicate. ;)
>
> So, after my scripts take the info from the POST forms and place it into
> variables, these variables seem to retain the values instead of clean up at
> the
> end of the script. I use "my" throughout. I simply cannot see why the
> variables
> would become global _and_ persistent. I can't vouch for "global" I guess...
> I
> think it's only within a certain server thread and not the entire server
> since
> subsequent refreshes may yield other sets of info as well and many refreshes
> later you end up cycling through all sets.
>
> Again, I would appreaciate any and all help.
>
> Demetrios