I can think of two very annoying places where state gets kept that is out of your control:

  1. You're using mod_perl and somewhere you keep state in variables. This might be the proverbial global $counter variable or something more hidden. Usually contributing to the confusion is if you have multiple Apache processes (and mod_perl interpreter instances) where each process keeps its own state. The approach to the solution is to start Apache in the single-worker mode and to try to reproduce the failure there.
  2. Browser caching is the second nasty thing that shows you results that you don't expect. I usually use wget or curl or LWP::Simple to get at the raw data without any browser caching getting in the way.

As a general approach, I would add the appropriate indices on the database side, making the number column unique to prevent duplicate entries even if the application logic fails.


In reply to Re: Weird CGI behaviour on different Browsers - Apache by Corion
in thread Weird CGI behaviour on different Browsers - Apache by Yaerox

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.