note 45620 added to function.die
| From: | dle at interchain dot nl | Date: | Mon, 13 Sep 2004 07:44:36 +0000 |
| Subject: | note 45620 added to function.die | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76598@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/function.die.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45620
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45620&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45620&report=yes
Search -- http://master.php.net/manage/user-notes.php