| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2000-11-02 20:21 UTC] doktor1 at earthlink dot net
 If I system("/path/to/ping somehost") and then hit Stop or close the browser or go to a different page, the ping process will still be in the process table, and show as being owned (PPID) by httpd. I don't know whether this is an issue with php or with Apache.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 01:00:02 2025 UTC | 
PHP cannot do this. Since PHP has no way to know which processes are launched with your system command, and the Apache process does not stop - so system won't terminate executed process - you should take care on this by yourself. See for example proposal from Jean-Michel Dault <jmdault@mandrakesoft.com>: This is an Apache issue. This bug is not present in the standalone version. Even if you press stop, the apache process is trill running. Solution: system("/path/to/ping -w SECS somehost") to have it die after SECS seconds But then, if you press stop, you'll still have zombie processes... So you should try this: echo "ping -w 30 \$1" > /tmp/ping;chmod 0755 /tmp/ping ... and have <?php system("/tmp/ping $host"); ?> instead If fixes the problem.