Merge branch 'master' into storageareas

pull/2681/head
Isaac Connor 2019-08-08 09:27:27 -04:00
commit a9de537e01
4 changed files with 75 additions and 53 deletions

View File

@ -646,6 +646,23 @@ Why am I getting broken images when trying to view events?
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754
I can review events for the current day, but ones from yesterday and beyond error out
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you've checked that the `www-data` user has permissions to the storage folders, perhaps your php.ini's timezone setting is incorrect. They _must_ match for certain playback functions.
If you're using Linux, this can be found using the following command: ::
timedatectl | grep "Time zone"
If using FreeBSD, you can use this one-liner: ::
cd /usr/share/zoneinfo/ && find * -type f -exec cmp -s {} /etc/localtime \; -print;
Once you know what timezone your system is set to, open `/etc/php.ini` and adjust ``date.timezone`` to the appropriate value. the PHP daemon may need to be restarted for changes to take effect.
Why is the image from my color camera appearing in black and white?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you recently upgraded to zoneminder 1.26, there is a per camera option that defaults to black and white and can be mis-set if your upgrade didn't happen right. See this thread: http://www.zoneminder.com/forums/viewtopic.php?f=30&t=21344
@ -728,6 +745,8 @@ What causes "Invalid JPEG file structure: two SOI markers" from zmc (1.24.x)
Some settings that used to be global only are now per camera. On the Monitor Source tab, if you are using Remote Protocol "HTTP" and Remote Method "Simple", try changing Remote Method to "Regexp".
Miscellaneous
-------------------
I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder?

View File

@ -573,7 +573,9 @@ sub CopyTo {
my $moved = 0;
if ( $$NewStorage{Type} eq 's3fs' ) {
if ( $$NewStorage{Url} ) {
my ( $aws_id, $aws_secret, $aws_host, $aws_bucket ) = ( $$NewStorage{Url} =~ /^\s*([^:]+):([^@]+)@([^\/]*)\/(.+)\s*$/ );
if ( $aws_id and $aws_secret and $aws_host and $aws_bucket ) {
eval {
require Net::Amazon::S3;
require File::Slurp;
@ -583,20 +585,20 @@ sub CopyTo {
( $aws_host ? ( host => $aws_host ) : () ),
});
my $bucket = $s3->bucket($aws_bucket);
if ( ! $bucket ) {
if ( !$bucket ) {
Error("S3 bucket $bucket not found.");
die;
}
my $event_path = 'events/'.$self->RelativePath();
my $event_path = $self->RelativePath();
Debug("Making directory $event_path/");
if ( ! $bucket->add_key( $event_path.'/','' ) ) {
if ( ! $bucket->add_key($event_path.'/', '') ) {
die "Unable to add key for $event_path/";
}
my @files = glob("$OldPath/*");
Debug("Files to move @files");
for my $file (@files) {
foreach my $file ( @files ) {
next if $file =~ /^\./;
( $file ) = ( $file =~ /^(.*)$/ ); # De-taint
my $starttime = [gettimeofday];
@ -621,7 +623,11 @@ sub CopyTo {
$moved = 1;
};
Error($@) if $@;
die $@ if $@;
} else {
Error("Unable to parse S3 Url into it's component parts.");
}
#die $@ if $@;
} # end if Url
} # end if s3
my $error = '';

View File

@ -114,7 +114,7 @@ class Filter extends ZM_Object {
}
public function control($command, $server_id=null) {
$Servers = $server_id ? Server::find(array('Id'=>$server_id)) : Server::find();
$Servers = $server_id ? Server::find(array('Id'=>$server_id)) : Server::find(array('Status'=>'Running'));
if ( !count($Servers) and !$server_id ) {
# This will be the non-multi-server case
$Servers = array(new Server());
@ -124,7 +124,7 @@ class Filter extends ZM_Object {
if ( !defined('ZM_SERVER_ID') or !$Server->Id() or ZM_SERVER_ID==$Server->Id() ) {
# Local
Logger::Debug("Controlling filter locally $command for server ".$Server->Id());
daemonControl($command, 'zmfilter.pl', '--filter_id='.$this->{'Id'});
daemonControl($command, 'zmfilter.pl', '--filter_id='.$this->{'Id'}.' --daemon');
} else {
# Remote case

View File

@ -45,9 +45,6 @@ if ( !$filter ) {
$filter = new ZM\Filter();
}
ZM\Logger::Debug("Query: " . $filter->Query_json());
ZM\Logger::Debug("Query: " . print_r($filter->Query(), true));
if ( isset($_REQUEST['filter']) ) {
# Update our filter object with whatever changes we have made before saving
#$filter->set($_REQUEST['filter']);