PHP script stops after it takes a long time to load

If you have a PHP script that may take a long time to process (more than a couple minutes), make sure you’re printing output as it gets generated. If the page takes too long to load then some browsers will close the connection if nothing is being sent to it. All you have to do is print out a character to keep the connection open, so if you’re in a loop, trying printing “.” every iteration.

Hope that helps!


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *