ignore_user_abort doesn't work?

#1
Hello,

i wrote a simply irc-bot in php and it seems that lsws ( or php5.2.4 ) has some problems with ignore_user_abort function. It doesn't actually work... When user clicks "close" button in a browser then he stops a script. I tested the bot on my local environment ( apache 2.0.55, php 5.1.1 ) and it works perfect...

I use lsws 3.3 ent; php 5.2.4 & suExec
 

mistwang

LiteSpeed Staff
#2
ignore_user_abort may only work with Apache as Apache embed PHP engine in httpd process. LSWS has no clue whether "ignore_user_about" has been set or not, and the PHP process might be assigned to another request or shutdown.
We will take a closer look, it may not be possible to make it work properly with lsphp.
 

mistwang

LiteSpeed Staff
#5
ignore_user_abort works well when PHP has been started in self-managed mode, that way, LSWS only start one parent process, that parent process will start children process to serve requests. When a request abort, the children process that handles the request will continue till the request has been finished.

So, you need to set "PHP_LSAPI_CHILDREN" env greater than "Max Connections" for the lsphp external app, and "Instances" should be set to "1".
 
Top