Duplicate emails being sent

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Duplicate emails being sent

Post by Eran »

VladSun wrote:
pytrin wrote:Exim (or whatever mail server you use) is probably misconfigured.
If it so, why there are 2 lines in the error log per a single execution?
Missed that

Could this be due to apache directory settings somehow?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Duplicate emails being sent

Post by VladSun »

pytrin wrote:Could this be due to apache directory settings somehow?
It's the same for PHP CLI as far as I understood.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Duplicate emails being sent

Post by pickle »

VladSun wrote:That's for PHP CLI, right?

PHP version?
That's for both CLI & web version.

PHPv5.2.6
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Duplicate emails being sent

Post by VladSun »

I still need to be clarified - do PHP CLI scripts execute twice?
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Duplicate emails being sent

Post by pickle »

VladSun wrote:do PHP CLI scripts execute twice?
CLI scripts get executed only once.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Duplicate emails being sent

Post by VladSun »

What about your Apache access file - does the GET line appears once or twice? Maybe a browser problem ;)
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Duplicate emails being sent

Post by pickle »

VladSun wrote:What about your Apache access file - does the GET line appears once or twice?
I'm not sure what you're asking.
VladSun wrote:Maybe a browser problem ;)
Sonofa! It is a browser issue! This problem only happens in FF3, not IE. I never would have imagined that. Any clues as to what's up with that?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Duplicate emails being sent

Post by VladSun »

pickle wrote:
VladSun wrote:What about your Apache access file - does the GET line appears once or twice?
I'm not sure what you're asking.
I meant the access.log file :)
pickle wrote:
VladSun wrote:Maybe a browser problem ;)
Sonofa! It is a browser issue! This problem only happens in FF3, not IE. I never would have imagined that. Any clues as to what's up with that?
Gosh! I was about to say this much earlier, but I misundertood you with the CLI PHP - thought it had the same problem.

Sorry, but I have no idea what could cause this in FF browser.

Still, you must remove the "echo" line from the code in your very first post. Otherwise, you may get two emails again ;)
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Duplicate emails being sent

Post by pickle »

Ya, the "echo" line is gone.

Thanks for your help.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Duplicate emails being sent

Post by pickle »

I think I figured out (with help from ~Vladsun of course) why this is happening.

I've got Firebug enabled & I must have set it to automatically re-submit form data so it can inspect the result. That's why the page gets submitted twice, but I only see the output once.

Incidentally, does anyone know how to turn that off? I can't find the setting in Firebug, and Google has no clue.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply