How to set the max execution time of script in php when the server is in safe mode? -


i want upload , download files server. server in safe mode not allowing increase execution time of script. cant increase time limit script timing out. appreciated.

there ugly hack remember server environments cannot control timeout. here goes -

  • when process starts, set processid in db
  • you timeout page , reload page before timeout happens using javascript, on each such load (using javascript), pass processid stored in db
  • on page load, check if processid exists in db , accordingly restart script left (i not sure how work in case of upload/download, can break file pieces).
  • on completion of job, delete processid db.

as mentioned ugly hack, please use if left no other choice or if else cannot suggest better option. let know how goes or if need details.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -