Hi there,

On Thu, 7 Feb 2002, Miroslav Madzarevic wrote:

> Is it possible that my perl script (Apache::Registry, Apache::PerlRun, 
> HTML::Mason or whatever) could run multiple times with same parameters when the
> user just invokes the URL once (for example clicks on <A> tag)  and if so how 
> can I prevent this from happening.
> 
> I guess this is because of subrequests being fired and I _explicitly_ don't 
> wish my code to run multiple times because strange things might happen.

There are lots of ways of finding out what happens when a request comes in.
Read the debugging section of the mod_perl Guide: http://perl.apache.org/guide.
I favour tailing the error_log and printing truckloads of debug info in there
as a matter of routine.  (Amazing what you find, sometimes. :)

Browsers like Netscape can fire off lots of parallel requests.  You
might not expect them to do that.  Even if everything works like you
expect, if it runs on a Webserver how are you going to prevent people
double-clicking, or lots of people all clicking at once?  You'd better
fix your code so it can cope.

73,
Ged.

Reply via email to