note 45620 rejected from function.die by nlopess

From: Date: Mon, 13 Sep 2004 18:10:07 +0000
Subject: note 45620 rejected from function.die by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76630@lists.php.net to get a copy of this message
Note Submitter: dle at interchain dot nl ---- We are using Apache 2 and php 4 (on Linux(Fedora)) with our own impl. of an odbc client and odbc server. PHP loads the odbc client lib, does a odbc_connect (not persistent!), odbc_prepare, odbc_execute and the first fetch. At this point we use a timer mechanism in php to 'die' as soon as the enduser breaks the connection.(e.g. closes the browser or clicks another link). So far so good, the php script 'dies' when the browser is closed, but the odbc server is still processing the request. So we want to stop the odbc server process, because it does not 'know' that the client went to Nirwana already. To do this, the server 'pings' the client process regularly using a timer. As soon as the client does not answer the 'ping', the server will stop. This mechanism works fine on command line php. However, probably because Apache runs a permanent set of processes, the 'ping' messages keep being returned to the server even though the script 'died' with the 'die' command. What to do? de Lange Netherlands

« previous php.notes (#76630) next »