Video export does not work (ZM 1.25.0 + Ubuntu 11.04)
Posted: Tue Jan 31, 2012 6:41 am
Ubuntu 11.04 and ZM v1.25.0 + Foscam FI8905W cameras
Export video files function does not work, error from log:
2012-01-31 07:55:55.768860 web_php 31777 ERR Export Failed includes/functions.php 2322
2012-01-31 07:55:54.059113 web_php 31777 ERR Command 'cat 'temp/zmFileList.txt' | zip -q 'temp/zmExport.zip' -@' returned with status 12 skins/classic/includes/export_functions.php 1118
Export to .tar says "export succeed", but file is only 45bytes
export_functions.php line 1118 is "Error( "Command '$command' returned with status $status" );"
functions.php line 2322 is "Error( $message );"
I did find some bug report:
3) Scroll to line 255 and look for the following line(error is in red):
$exportFileList = array_merge( $exportFileList, exportFileList( $eid ), $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc );
and edit it to this(remove bracket at the end of $eid and place it after $exportMisc):
$exportFileList = array_merge( $exportFileList, exportFileList( $eid , $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc ));
Checked my file and it was Ok (line number didn't match):
I can export image + other files, but not video files.
Export video files function does not work, error from log:
2012-01-31 07:55:55.768860 web_php 31777 ERR Export Failed includes/functions.php 2322
2012-01-31 07:55:54.059113 web_php 31777 ERR Command 'cat 'temp/zmFileList.txt' | zip -q 'temp/zmExport.zip' -@' returned with status 12 skins/classic/includes/export_functions.php 1118
Export to .tar says "export succeed", but file is only 45bytes
export_functions.php line 1118 is "Error( "Command '$command' returned with status $status" );"
Code: Select all
//cat zmFileList.txt | zip -q zm_export.zip -@
//-bash: zip: command not found
exec( $command, $output, $status );
if ( $status )
{
Error( "Command '$command' returned with status $status" );
if ( $output[0] )
Error( "First line of output is '".$output[0]."'" );
return( false );
}
}
functions.php line 2322 is "Error( $message );"
Code: Select all
function ajaxError( $message, $code=HTTP_STATUS_OK )
{
Error( $message );
if ( function_exists( 'ajaxCleanup' ) )
ajaxCleanup();
if ( $code == HTTP_STATUS_OK )
{
$response = array( 'result'=>'Error', 'message'=>$message );
header( "Content-type: text/plain" );
exit( jsonEncode( $response ) );
}
header( "HTTP/1.0 $code $message" );
exit();
}
3) Scroll to line 255 and look for the following line(error is in red):
$exportFileList = array_merge( $exportFileList, exportFileList( $eid ), $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc );
and edit it to this(remove bracket at the end of $eid and place it after $exportMisc):
$exportFileList = array_merge( $exportFileList, exportFileList( $eid , $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc ));
Checked my file and it was Ok (line number didn't match):
Code: Select all
if ( is_array( $eids ) )
{
foreach ( $eids as $eid )
{
$exportFileList = array_merge( $exportFileList, exportFileList( $eid , $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc ) );
}
}