[nycphp-talk] PHP Executing Twice
Hans Zaunere
zaunere at yahoo.com
Thu Jul 11 19:04:03 EDT 2002
--- Jeremy Hise <jhise at linuxforbusiness.org> wrote:
> Hi:
>
> I've got a PHP script that seems to be executing twice.
>
> The page basically does the following:
>
> 1) Accept FORM vars from posting page
> 2) Checks to see if a any records already contain the value posted
> 3) If not, send that value to a stored procedure that inserts it
> 4) If so, alert the user and bail
>
> However, when I call this page, I get the results from #4. Even
> though
> the value doesn't exist in the database. If I exit after #2 and
> before #
> 3, it tells me that #3 should fire. But #4 does...which would
> indicate
> that the code is executing twice...which just seems ridiculous to me.
Check that you're breaking out of nested loops properly and have
explicit elses/breaks where needed extra - watch for the
waterfall/fall-through effect.
>
> As a side note, the machine that is running this has a history of odd
> behavior including:
>
> 1) PHP randomly stops rendering HTML
> 2) Random/garbage Oracle output
Versions/platform? I've seen wierd behavior with OCI, mostly with
persistent connections, so that might be something to play around with.
Also I've seen PHP get confused with recursive includes/requires
(mostly on 4.0.6).
Hans Z.
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
More information about the talk
mailing list