Stop php script execution -
i have php_mod , apache server. if start script browser persist until execution complete ( if close browser )
how can stop process ?
normally, if you're sending output, doesn't happen: if webserver detects disconnect, php process stoppend (which why have functions register_shutdown_function
make sure done (unelss encounter fatal error of course)).
however, http stateless, point in time webserver detect disconnect when trying send content (see remarks @ ignore_user_abort
(default false, want)). depending on context of request, workable kludge in big loops send non-displayed data user, in html send whitespace , flush
. can end in buffer though, (php's, servers, other places in network) detection still not 100%, unavoidable. sane time limit avoid infinite looping, , upping limit requests need them best can do.
Comments
Post a Comment