diff --git a/web/skins/classic/views/onvifprobe.php b/web/skins/classic/views/onvifprobe.php index 700246936..c183d010c 100644 --- a/web/skins/classic/views/onvifprobe.php +++ b/web/skins/classic/views/onvifprobe.php @@ -28,12 +28,18 @@ $cameras = array(); $cameras[0] = translate('ChooseDetectedCamera'); -function execONVIF( $cmd ) -{ - exec( escapeshellcmd(ZM_PATH_BIN . "/zmonvif-probe.pl $cmd"), $output, $status ); - - if ( $status ) - Fatal( "Unable to probe network cameras, status is '$status'" ); +function execONVIF( $cmd ) { + $shell_command = escapeshellcmd(ZM_PATH_BIN . "/zmonvif-probe.pl $cmd"); + + exec( $shell_command, $output, $status ); + + if ( $status ) { + $html_output = implode( '
', $output ); + Fatal( "Unable to probe network cameras, status is '$status'. Output was:

+ $html_output

+ Please the following command from a command line for more information:

$shell_command" + ); + } return $output; }