note 86965 deleted from function.exec by cmb

From: Date: Sun, 24 Nov 2019 08:54:31 +0000
Subject: note 86965 deleted from function.exec by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-213215@lists.php.net to get a copy of this message
Note Submitter: henze ---- if you are using exec on a w2k3 machine with IIS and after a few times the page or IIS just hangs, you should add: " && exit" to your command. this way the cmd will always exit. example: <?php $computername = "MyComputer"; $ip = gethostbyname($computername); exec("ping ".$ip." -n 1 -w 90 && exit", $output); print_r($output); ?> You could also try this when you have problems with the system-function or any other method you use to execute a program! Maybe also useful when using apache, but I'm not sure about that!

« previous php.notes (#213215) next »