|
Posted by Marcel on 06/01/06 14:29
"Erwin Moller"
<since_humans_read_this_I_am_spammed_too_much@spamyourself.com> schreef in
bericht news:447ee31b$0$31644$e4fe514c@news.xs4all.nl...
> Marcel wrote:
>
>> I have a problem with a PHP page that seems to get executed twice.
>>
>> I am running PHP5 ISAPI on 2003 server.
>>
>> The script is a PHP page with a form. When the form is submitted one
>> record have to be inserted in the database but when i look at the
>> database
>> after submitting the form there are two(!) records inserted so it looks
>> like the script is executed twice.
>
> Hi Marcel,
>
> Sorry to say, but this is most likely a problem in your code, not in the
> server/webserver/PHP.
Yeah, maybe you are right but i am an experienced coder and i have been
searching for 2 days now where this is coming from.
I will post my code but it's kind of advanced PHP5 OOP stuff.
>
> Are you maybe sending the form to the same page that produces the form?
Yes i am posting to the same page. So the page takes care of the database
activity too
> If so, are you sure your checks for a posting and the following DB-inserts
> are working as expected?
I have made a SQL class that takes care of the inserts and updates in the MS
SQL Server database
>
> Maybe add a few echo's before inserting and check if they show up
> unexpectedly?
I have put a mail() in my page to check and i receive a testmail twice... so
that makes me again think the page is executed twice.......
>
> And you can always show us some code (preferable stripped down to the
> core).
>
>>
>> Can this be a proxy-setting or an ISA`server related subject???
>
> I don't think so, but then again, I don't know what an ISAserver is.
>
>>
>> Anyone ever experienced similair problems?
>
> Only under Tomcat with Java (which creates a complete copy of the webapp
> for
> purposes still mysterious to me), never with PHP under *nix or ISS.
>
>>
>> Marcel
>
> Regards,
> Erwin Moller
[Back to original message]
|