Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Weird CGI behaviour on different Browsers - Apache

by Anonymous Monk
on Aug 04, 2015 at 12:25 UTC ( [id://1137361]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Weird CGI behaviour on different Browsers - Apache
in thread Weird CGI behaviour on different Browsers - Apache

What do you think and mean by saying "Multiple inserts of the same value"?

You said in the OP:

... another third weird way the script runs sometimes is, that the line is getting inserted 2 times ...

Which I took to mean that the INSERT is executed twice and you end up with two rows in the DB with the same value(s)...?

Replies are listed 'Best First'.
Re^4: Weird CGI behaviour on different Browsers - Apache
by Yaerox (Scribe) on Aug 04, 2015 at 12:28 UTC
    That's the weird point. I do only have one single execution in my script. There is no loop, just a single INSERT-Execution wirtten in my script. That's why I came to the thoughts of a redirection loop - which I didn't found yet.

      Yes, it's a possibility that your script is executing twice. You said in the OP "the exit is getting ignored" - that is such an unlikely bug that it's practically impossible. So you need to keep track of the state to detect and prevent multiple executions of the script.

      Perhaps it's time to develop a test case that reproduces the problem, like a few really short CGI scripts that redirect to each other, similar to what your code is doing now. Post it here so we can help you debug, otherwise we're left guessing and all the debugging is up to you.

        Okay, I just got another good idea of someone else using a CONSTRAINT on the database, because server log will tell me where in my script, then I can face how often and if why it's getting executed more then once. If I won't come to an conclusion I'll go for the test-script creation.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1137361]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-26 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found