Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does browser stop/crash halts script execution?

Tags:

php

I mean, if a php script/page is invoked by a browser and page load/execution is interrupted by user or by browser crash, does script execution continues on the server side?

like image 640
Riccardo Avatar asked Jul 05 '10 15:07

Riccardo


3 Answers

yes, unless you call ignore_user_abort() first. http://php.net/manual/en/function.ignore-user-abort.php

like image 138
Mike Sherov Avatar answered Oct 29 '22 13:10

Mike Sherov


Depends on ignore_user_abort() setting

like image 25
Kamil Szot Avatar answered Oct 29 '22 14:10

Kamil Szot


Depends on ignore_user_abort(). But if you have some loop or poorly written code, it will run until script timeout / max execution time has been reached (~30 seconds).

like image 1
Jason McCreary Avatar answered Oct 29 '22 14:10

Jason McCreary