RE: Can a script run twice?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK I found this out last week... if its not a coding error... its this..

There is a bug with IE7, I have some billing scripts for a large Sydney ISP
and I was working on a script on my laptop which I recently updated to
IE7... after tipping my hair out for a few hours cause I was certain it was
not a coding error I decided the run the script from my PC which was still
IE6 and would u believe it, the script only run once

I did some searching on (good old faithful) google and did discover a few
bugs with IE7... whats this have to do with PHP u ask... one was a session
bug.. and with my double script running bug which I could not find any
information on... I decided to lock the site to IE7 with javascript and told
the ISP to roll back or stay locked out....

A lot of money @ stake... damn u Micro$oft...

CK

> -----Original Message-----
> From: Stut [mailto:stuttle@xxxxxxxxx]
> Sent: Tuesday, 23 May 2006 10:06 PM
> To: Lester Caine
> Cc: PHP List
> Subject: Re:  Can a script run twice?
> 
> Lester Caine wrote:
> 
> > I'm having very occasional problems with my PHP5 applications which
> > only seem to be explained if the script is run twice.
> >
> > Example - page has 'Add Ticket' button, which adds a record and marks
> > it as being processed by the location that created it. 99.99% of the
> > time no problems, but just now and again there are two records, with
> > different primary keys - so the database bit worked - but with very
> > close now times and identified as being at the same counter. The next
> > page does not have the 'Add Ticket' button, so it would seem the first
> > script was trigger twice?
> >
> > Am I simply going mad ( which is the logical choice ;) ), or is this
> > something that can happen and needs to be handled?
> 
> This can happen if a page contains a reference to an empty URL. For
> example, <img src="" /> would cause the page to be loaded twice in some
> browsers. That'd be the first thing I'd check.
> 
> Is the 'Add Ticket' button a GET or POST request? If it's a POST then
> chances are the script itself has a logic error since the user would get
> asked if they wanted to repost the data. If it's a get then you've
> violated one of the cardinal rules of web-based application development
> - GETs get, POSTs do.
> 
> -Stut
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux