fixed quiet exec failure in php

The exec command used in the php scripts would quietly fail
if and error occurred (e.g. permission denied).  This has
been fixed by checking for an error and complaining loudly
(exit($msg)) when it fails.