When I use sleep at a higher setting, the page stops loading. Is there a setting I can add into my php like set_time_limit to allow it to continue working at that sleep rate?

    I'm not sure what you mean. Sleep() pauses script execution for the specified number of seconds, so by definition it does not do any "work" until that sleep() period is over.

      When I load the script with <?php sleep(10);echo "hello";?>, it loads after 10 seconds. When I put it for 360 seconds, the page load stops with "Internet Explorer cannot display the webpage" and it doesn't echo hello.

        That's a browser time-out issue. If you really need to do something like that, you might want to do some sort of loop that outputs something on each iteration between shorter sleep() periods. But without understanding the underlying requirements, I won't even claim sleep() is the best way to do it: maybe it should be JavaScript doing a delay and then making an AJAX request to a PHP script?

          I forgot to mention that the long sleep is fine on both ff and ie when I'm loading it on my localhost. It only dies when its on my shared hosting.

            Thanks NogDog. I did a for X loop with a sleep(1);echo " "; and it worked.

              Write a Reply...