I have a PHP script that runs twice for a certain (very important) user. I can not get it to run twice, even using the same browser. Unfortunately, I can't link to it here.
The script is part of a newsletter system I've been writing. In this particular section (actually creating and sending the letter) there are 3 pages - the first is where the administrator enters the subject, the newsletter and the category or categories of subscribers that it is to sent to. They then click on send and they got a confirmation page. This shows how many members are in the categories they selected and an overview of the letter. If they're happy, they then click on Confirm and the final script loops, going through the database and gets the details for each subscriber (name, email address, etc), personalizes it for that subscriber and sends off the email. The problem is that the final script will execute twice for a particular administrator, sending everyone two emails.
I've done some sniffing at log files and found that it is executed twice, rather than some bug making a large part of my script get looped twice. Interestingly, the first execution has the HTTP_REFERER set correctly to the confirmation page. The second call has no HTTP_REFERER set. The time difference between the 2 scripts being run is 0 seconds (all the logs are precise to just 1 second). I'm pretty sure the admin isn't calling it twice. I put in javascript to disable the submit button after it's clicked much like this board has for the reply button (in fact, very much like what this board has :shifty: ). Also, the HTTP_REFERER isn't set for the second execution when it should be. The fact that it is set for the first one shows that it is indeed working (I know thisn't 100% reliable). The newsletter details are passed on both executions (via POST).
I've helped the issue somewhat but it's treating symptoms, not the cause. The submit disabler failed completely but more successful is the anti-dup system I implemented. Each sent letter is saved for future viewing along with the time it was send - before running the main read member info/send email loop, I checked the saved messages for one with the same subject, body and any of the same subscriber categories that have been sent in the last 30 mins and quit with an error message if any are found. It works, but I'd like to fix it properly.
Every Xbox is a slimmed-down and modified Windows.
Xbox 1 (2002) was a Windows NT
Xbox 360 Windows 8
Xbox One Windows 10
Xbox SX Windows 11
all with versions with specific services just for games.
The Windows that will come on laptops will be a slimmed-down Windows 11 Home focused on games.
The problem was that people who have played Extraction Shooters said there were too many missing features. Like Proximity Chat ...because of "toxicity". Lack of any story development even actually outlined. "Too watered down" for regular Extraction Shooter Enjoyers. Stupid amount of Aim Assistance on MnK. Questionable outdoor map design (how can something so "colorful" be so effing dull).
Not to mention people still ###### they seemed to use the Marathon name and added in the alien/npcs after the fact, stappled on some other game concept they were working on. Like Arkane Studios was forced to use Prey as a title for their own original IP, by Bethesda to sucker in people for name recognition and ownership over the Prey IP. Which backfired with lower sales, due to the people realizing not a sequel or reboot, and the people who didn't like the original Prey.
Best practice when switching platforms is to always start fresh and install chipset drivers after reinstall to avoid any issues. I've yet to find a way to eliminate problems caused by this in the same way you can just DDU GPU drivers and switch. Would be nice if they could facilitate it.
Yeah the launcher is fine, but 400mb for the package of all the apps if you only want to use 1 or 2 isn't in my opinion, and seems totally unnecessary.
Question
Quboid
I have a PHP script that runs twice for a certain (very important) user. I can not get it to run twice, even using the same browser. Unfortunately, I can't link to it here.
The script is part of a newsletter system I've been writing. In this particular section (actually creating and sending the letter) there are 3 pages - the first is where the administrator enters the subject, the newsletter and the category or categories of subscribers that it is to sent to. They then click on send and they got a confirmation page. This shows how many members are in the categories they selected and an overview of the letter. If they're happy, they then click on Confirm and the final script loops, going through the database and gets the details for each subscriber (name, email address, etc), personalizes it for that subscriber and sends off the email. The problem is that the final script will execute twice for a particular administrator, sending everyone two emails.
I've done some sniffing at log files and found that it is executed twice, rather than some bug making a large part of my script get looped twice. Interestingly, the first execution has the HTTP_REFERER set correctly to the confirmation page. The second call has no HTTP_REFERER set. The time difference between the 2 scripts being run is 0 seconds (all the logs are precise to just 1 second). I'm pretty sure the admin isn't calling it twice. I put in javascript to disable the submit button after it's clicked much like this board has for the reply button (in fact, very much like what this board has :shifty: ). Also, the HTTP_REFERER isn't set for the second execution when it should be. The fact that it is set for the first one shows that it is indeed working (I know thisn't 100% reliable). The newsletter details are passed on both executions (via POST).
I've helped the issue somewhat but it's treating symptoms, not the cause. The submit disabler failed completely but more successful is the anti-dup system I implemented. Each sent letter is saved for future viewing along with the time it was send - before running the main read member info/send email loop, I checked the saved messages for one with the same subject, body and any of the same subscriber categories that have been sent in the last 30 mins and quit with an error message if any are found. It works, but I'd like to fix it properly.
Link to comment
https://www.neowin.net/forum/topic/106107-php-script-executing-twice-for-no-apparent-reason/Share on other sites
2 answers to this question
Recommended Posts