I have an issue with a mobile messaging website that businesses use to send out bulk messages. It was developed with php and javascript. The screen just goes blank upon sending bulk text messages
I think that AJAX may be the solution to the problem with the site. It is likely that if the code is running longer than the maximum allowed execution time, the connection to the end-user's browser would be closed, either by the server, or even by the client's browser, leaving the user with a blank screen if there is no output from the processing script to keep the connection alive.
It is also likely that, if the script is running then the maximum execution time for PHP, that this is why not ALL of the texts are being sent.
Ideally as soon as I submit the form to send message a process will start that will use AJAX (or other technology) and it would send messages in small groups and will update the user screen with stats, expected time to end etc.
What I want is the server to do it's business no matter how long it takes and update the client every 5-10 seconds with an update.
I would also like the user to be able to navigate away from the 'sending' page without affecting the message sending process i.e Even if the browser is closed in the middle of the sending process then the messages are still sent on the server.
## Deliverables
WHAT MY HOSTING COMPANY SAID ABOUT THIS PROBLEM...
This is definitely a code issue rather than a server issue. The server isn't
ceasing to serve content.
One theory that could explain it:
If your code is running longer than the maximum allowed execution time for
either PHP or Apache, the connection to the end-user's browser would be closed,
either by the server, or even by the client's browser, leaving the user with a
blank screen if there is no output from the processing script to keep the
connection alive.
It is also likely that, if the script is running than the maximum execution
time for PHP and/or Apache, that not ALL of the texts are being sent.