Closed Bug 441041 Opened 18 years ago Closed 17 years ago

Mysql inserts records 2 times

Categories

(Firefox :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

VERIFIED INCOMPLETE

People

(Reporter: daniboy, Unassigned)

Details

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061302 Firefox/3.0 Flock/2.0b1 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061302 Firefox/3.0 Flock/2.0b1 I have this page, that when a user clicks it, it inserts a tracking code into my MySQL database. This works great in FF2. In FF3, this enters 2 records instead of one. But this only happens when using mod_rewrite in the htaccess file and going to a re-written URL, as if it's reloading the page for some reason. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Firefox as browser knows nothing about Mysql, mod_rewrite and such other things because this is all serverside. You have to tell in a bug report what Firefox is doing wrong at the http level.
(In reply to comment #0) > In FF3, this enters 2 records instead of one. > But this only happens when using mod_rewrite in the htaccess file and going to a re-written URL, > as if it's reloading the page for some reason. To Dan Hill(bug opener): Do you understand "what mod_rewrite does" well/correctly? Do you use "mod_rewrite" properly? For "as if it's reloading the page". When Firebug is used and some options are enabled, and if JavaScript Error occurs in a page, and if it relates to form posting, similar phenomenon can occur. - Firebug tries to get source for the URI when JavaScript error. It's same as "View Source" via menu. - Firefox issues HTTP request again to same URI upon "View Source" request. - PHP script considers the request for "View Source" as new POST request. - PHP script usually doesn't care for such situation, both real double post and double post like request such as above in special situation. So DB update or log by PHP script becomes "as if double post". Is there this kind of situation in your problem? Check HTTP flow including <meta http-equiv=... > in HTML data. Is fault of Firefox 3 involved in your problem really? Please note "Here is bugzilla.mozilla.org, not Help Center nor support forum." If you need help, ask help at appropriate forum. If fault of Firefox 3 or JavaScript error due to incompatibility of Firefox 3 is suspected, I think MozillaZine forum is the best place. (I post comments there with user name of "Soarex" sometimes.) If fault of PHP or your PHP script is suspected, PHP forum or newsgroup is best place. If fault of mod_rewrite or your mod_rewrite use is suspected, forum or newsgroup for Apache/mod_rewrite is best place. Anyway, check HTTP flow first. I believe using add-on of "LiveHTTPHeaders" is simplest way for first/quick HTTP flow analysis.
need more info
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INCOMPLETE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.