Code: Select all
ZoneMinder is not installed properly: php's date.timezone is not set to a valid timezone
Next we can sign on but its directly followed by error:
Code: Select all
SQL-ERR 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'zm.Servers' doesn't exist', statement was 'SELECT * FROM Servers'
Following: https://wiki.zoneminder.com/Common_Issu ... PA_version
to try fix SQL DB issues...
--log:
Code: Select all
login as: dguser
dguser@192.168.117.103's password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
You have mail.
Last login: Tue Mar 1 11:09:33 2016 from 192.168.2.33
dguser@DGDEB03:~$
dguser@DGDEB03:~$
dguser@DGDEB03:~$ ls -al /usr/share/doc/zoneminder
total 120
drwxr-xr-x 3 root root 4096 Feb 22 11:43 .
drwxr-xr-x 1821 root root 69632 Nov 22 23:32 ..
-rw-r--r-- 1 root root 7545 Feb 21 03:37 changelog.Debian.gz
-rw-r--r-- 1 root root 94 Feb 3 20:30 changelog.gz
-rw-r--r-- 1 root root 11377 Feb 21 03:36 copyright
drwxr-xr-x 2 root root 4096 Feb 22 11:43 examples
lrwxrwxrwx 1 root root 22 Jul 20 2015 html -> ../zoneminder-doc/html
-rw-r--r-- 1 root root 293 Mar 31 2015 NEWS.Debian.gz
-rw-r--r-- 1 root root 2094 Feb 21 03:36 README.Debian.gz
-rw-r--r-- 1 root root 5879 Feb 21 03:39 README.md.gz
dguser@DGDEB03:~$ htop
-bash: htop: command not found
dguser@DGDEB03:~$ su
Password:
root@DGDEB03:/home/dguser# apt-get install htop
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
strace ltrace
The following NEW packages will be installed:
htop
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 75.3 kB of archives.
After this operation, 209 kB of additional disk space will be used.
Get:1 http://ftp.nl.debian.org/debian/ jessie/main htop amd64 1.0.3-1 [75.3 kB]
Fetched 75.3 kB in 0s (671 kB/s)
Selecting previously unselected package htop.
(Reading database ... 189269 files and directories currently installed.)
Preparing to unpack .../htop_1.0.3-1_amd64.deb ...
Unpacking htop (1.0.3-1) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for gnome-menus (3.13.3-6) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up htop (1.0.3-1) ...
root@DGDEB03:/home/dguser# htop
root@DGDEB03:/home/dguser#
root@DGDEB03:/home/dguser#
root@DGDEB03:/home/dguser# zm
zma zmcamtool.pl zmdc.pl.save zmore zmsystemctl.pl zmu zmwatch.pl
zmaudit.pl zmcontrol.pl zmf zmpkg.pl zmtrack.pl zmupdate.pl zmx10.pl
zmc zmdc.pl zmfilter.pl zmstreamer zmtrigger.pl zmvideo.pl
root@DGDEB03:/home/dguser# zmore
/bin/zmore: missing operands; try '/bin/zmore --help' for help
root@DGDEB03:/home/dguser# cmz --help
bash: cmz: command not found
root@DGDEB03:/home/dguser# zmc --help
zmc -d <device_path> or -r <proto> -H <host> -P <port> -p <path> or -f <file_path> or -m <monitor_id>
Options:
-d, --device <device_path> : For local cameras, device to access. E.g /dev/video0 etc
-r <proto> -H <host> -P <port> -p <path> : For remote cameras
-f, --file <file_path> : For local images, jpg file to access.
-m, --monitor <monitor_id> : For sources associated with a single monitor
-h, --help : This screen
-v, --version : Report the installed version of ZoneMinder
root@DGDEB03:/home/dguser# zmc -version
1.29.0
root@DGDEB03:/home/dguser# zmupdate.pl
Initiating database upgrade to version 1.29.0 from version 1.28.1
Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop : ^C
root@DGDEB03:/home/dguser# service zoneminder stop
root@DGDEB03:/home/dguser# zmupdate.pl
Initiating database upgrade to version 1.29.0 from version 1.28.1
Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :
Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /tmp/zm if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n
Upgrading database to version 1.29.0
Loading config from DB
Saving config to DB
DBD::mysql::db do failed: Access denied for user 'zmuser'@'localhost' to database 'zm' at /usr/share/perl5/ZoneMinder/ConfigAdmin.pm line 135, <STDIN> line 2.
Can't lock Config table: Access denied for user 'zmuser'@'localhost' to database 'zm' at /usr/bin/zmupdate.pl line 498.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle database=zm;host=localhost at /usr/share/perl/5.20/Carp.pm line 166, <STDIN> line 2.
root@DGDEB03:/home/dguser# users
dguser dguser
root@DGDEB03:/home/dguser# ls -al
total 3888
drwxr-xr-x 21 dguser dguser 4096 Mar 1 15:34 .
drwxr-xr-x 3 root root 4096 Nov 16 19:06 ..
-rw------- 1 dguser dguser 941 Feb 24 02:53 .bash_history
-rw-r--r-- 1 dguser dguser 220 Nov 16 19:06 .bash_logout
-rw-r--r-- 1 dguser dguser 3515 Nov 16 19:06 .bashrc
drwx------ 13 dguser dguser 4096 Nov 21 18:50 .cache
drwx------ 16 dguser dguser 4096 Nov 21 18:50 .config
-rw------- 1 dguser dguser 4730880 Nov 17 21:05 core
drwx------ 3 dguser dguser 4096 Nov 16 19:22 .dbus
drwxr-xr-x 2 dguser dguser 4096 Nov 16 19:22 Desktop
drwxr-xr-x 2 dguser dguser 4096 Nov 16 19:22 Documents
drwxr-xr-x 2 dguser dguser 4096 Nov 22 23:29 Downloads
drwx------ 3 dguser dguser 4096 Mar 1 15:34 .gconf
drwxr-xr-x 24 dguser dguser 4096 Nov 17 18:38 .gimp-2.8
drwx------ 3 dguser dguser 4096 Nov 23 00:12 .gnome2
drwx------ 2 dguser dguser 4096 Nov 16 20:06 .gnome2_private
drwx------ 2 dguser dguser 4096 Mar 1 15:36 .gnupg
-rw------- 1 dguser dguser 4520 Mar 1 15:34 .ICEauthority
drwx------ 3 dguser dguser 4096 Nov 16 19:22 .local
drwx------ 4 dguser dguser 4096 Nov 16 20:06 .mozilla
drwxr-xr-x 2 dguser dguser 4096 Nov 16 19:22 Music
-rw------- 1 dguser dguser 7 Feb 24 02:48 .nano_history
drwxr-xr-x 3 dguser dguser 4096 Nov 17 21:09 Pictures
-rw-r--r-- 1 dguser dguser 675 Nov 16 19:06 .profile
drwxr-xr-x 2 dguser dguser 4096 Nov 16 19:22 Public
drwx------ 2 dguser dguser 4096 Dec 1 23:49 .ssh
drwxr-xr-x 2 dguser dguser 4096 Nov 16 19:22 Templates
drwxr-xr-x 3 dguser dguser 4096 Nov 17 21:09 Videos
root@DGDEB03:/home/dguser# service mysql stop && cp -ra /var/lib/mysql mysqldata && service mysql start\
>
^C
root@DGDEB03:/home/dguser# service mysql stop && cp -ra /var/lib/mysql mysqldata && service mysql start
root@DGDEB03:/home/dguser# mysqldump --routines --events --flush-privileges --all-databases > all-db.sql
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect
root@DGDEB03:/home/dguser# cd /
root@DGDEB03:/#
root@DGDEB03:/# find . -name my.cnf
./etc/mysql/my.cnf
root@DGDEB03:/# nano /etc/mysql/my.cnf
root@DGDEB03:/# find . -name .my.cnf
root@DGDEB03:/# apt-get update
Ign http://ftp.nl.debian.org jessie InRelease
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://ftp.nl.debian.org jessie-updates InRelease [136 kB]
Hit http://ftp.nl.debian.org jessie Release.gpg
Get:3 http://http.debian.net jessie-backports InRelease [166 kB]
Get:4 http://security.debian.org jessie/updates/main Sources [118 kB]
Hit http://ftp.nl.debian.org jessie Release
Get:5 http://ftp.nl.debian.org jessie-updates/main Sources [2,296 B]
Get:6 http://ftp.nl.debian.org jessie-updates/main amd64 Packages/DiffIndex [367 B]
Get:7 http://ftp.nl.debian.org jessie-updates/main Translation-en [2,506 B]
Get:8 http://security.debian.org jessie/updates/main amd64 Packages [214 kB]
Hit http://ftp.nl.debian.org jessie/main Sources
Get:9 http://http.debian.net jessie-backports/main amd64 Packages/DiffIndex [27.8 kB]
Get:10 http://security.debian.org jessie/updates/main Translation-en [117 kB]
Hit http://ftp.nl.debian.org jessie/main amd64 Packages
Hit http://ftp.nl.debian.org jessie/main Translation-en
Get:11 http://http.debian.net jessie-backports/main Translation-en/DiffIndex [24.3 kB]
Get:12 http://http.debian.net jessie-backports/main amd64 2016-03-01-1452.37.pdiff [223 B]
Get:13 http://http.debian.net jessie-backports/main amd64 2016-03-01-1452.37.pdiff [223 B]
Fetched 871 kB in 4s (208 kB/s)
Reading package lists... Done
root@DGDEB03:/# systemctl stop zoneminder.service
root@DGDEB03:/# mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"
Enter password:
root@DGDEB03:/# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
libperl5.20 libssl1.0.0 openssl perl perl-base perl-modules
6 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,126 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://security.debian.org/ jessie/updates/main perl amd64 5.20.2-3+deb8u4 [2,638 kB]
Get:2 http://security.debian.org/ jessie/updates/main libperl5.20 amd64 5.20.2-3+deb8u4 [1,358 B]
Get:3 http://security.debian.org/ jessie/updates/main perl-base amd64 5.20.2-3+deb8u4 [1,224 kB]
Get:4 http://security.debian.org/ jessie/updates/main perl-modules all 5.20.2-3+deb8u4 [2,546 kB]
Get:5 http://security.debian.org/ jessie/updates/main libssl1.0.0 amd64 1.0.1k-3+deb8u4 [1,039 kB]
Get:6 http://security.debian.org/ jessie/updates/main openssl amd64 1.0.1k-3+deb8u4 [677 kB]
Fetched 8,126 kB in 1s (5,046 kB/s)
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 189280 files and directories currently installed.)
Preparing to unpack .../perl_5.20.2-3+deb8u4_amd64.deb ...
Unpacking perl (5.20.2-3+deb8u4) over (5.20.2-3+deb8u3) ...
Preparing to unpack .../libperl5.20_5.20.2-3+deb8u4_amd64.deb ...
Unpacking libperl5.20 (5.20.2-3+deb8u4) over (5.20.2-3+deb8u3) ...
Preparing to unpack .../perl-base_5.20.2-3+deb8u4_amd64.deb ...
Unpacking perl-base (5.20.2-3+deb8u4) over (5.20.2-3+deb8u3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up perl-base (5.20.2-3+deb8u4) ...
(Reading database ... 189280 files and directories currently installed.)
Preparing to unpack .../perl-modules_5.20.2-3+deb8u4_all.deb ...
Unpacking perl-modules (5.20.2-3+deb8u4) over (5.20.2-3+deb8u3) ...
Preparing to unpack .../libssl1.0.0_1.0.1k-3+deb8u4_amd64.deb ...
Unpacking libssl1.0.0:amd64 (1.0.1k-3+deb8u4) over (1.0.1k-3+deb8u2) ...
Preparing to unpack .../openssl_1.0.1k-3+deb8u4_amd64.deb ...
Unpacking openssl (1.0.1k-3+deb8u4) over (1.0.1k-3+deb8u2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up perl-modules (5.20.2-3+deb8u4) ...
Setting up perl (5.20.2-3+deb8u4) ...
Setting up libperl5.20 (5.20.2-3+deb8u4) ...
Setting up libssl1.0.0:amd64 (1.0.1k-3+deb8u4) ...
Setting up openssl (1.0.1k-3+deb8u4) ...
Processing triggers for libc-bin (2.19-18+deb8u3) ...
root@DGDEB03:/# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@DGDEB03:/# ap
apache2 applycal apt-config aptitude-run-state-bundle
apache2ctl applygnupgdefaults apt-extracttemplates apt-key
apachectl appres apt-ftparchive apt-listchanges
apg apropos apt-get apt-mark
apgbfm apt aptitude apt-show-versions
aplay apt-cache aptitude-create-state-bundle apt-sortpkgs
aplaymidi apt-cdrom aptitude-curses
root@DGDEB03:/# apt-show-versions |grep php5-
php5-cli:amd64/jessie 5.6.17+dfsg-0+deb8u1 uptodate
php5-common:amd64/jessie 5.6.17+dfsg-0+deb8u1 uptodate
php5-json:amd64/jessie 1.3.6-1 uptodate
php5-mysql:amd64/jessie 5.6.17+dfsg-0+deb8u1 uptodate
php5-readline:amd64/jessie 5.6.17+dfsg-0+deb8u1 uptodate
root@DGDEB03:/# apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
php5-gd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.9 kB of archives.
After this operation, 118 kB of additional disk space will be used.
Get:1 http://ftp.nl.debian.org/debian/ jessie/main php5-gd amd64 5.6.17+dfsg-0+deb8u1 [28.9 kB]
Fetched 28.9 kB in 0s (248 kB/s)
Selecting previously unselected package php5-gd.
(Reading database ... 189280 files and directories currently installed.)
Preparing to unpack .../php5-gd_5.6.17+dfsg-0+deb8u1_amd64.deb ...
Unpacking php5-gd (5.6.17+dfsg-0+deb8u1) ...
Processing triggers for libapache2-mod-php5 (5.6.17+dfsg-0+deb8u1) ...
Setting up php5-gd (5.6.17+dfsg-0+deb8u1) ...
Creating config file /etc/php5/mods-available/gd.ini with new version
php5_invoke: Enable module gd for apache2 SAPI
php5_invoke: Enable module gd for cli SAPI
Processing triggers for libapache2-mod-php5 (5.6.17+dfsg-0+deb8u1) ...
root@DGDEB03:/# rm /etc/apache2/conf-enabled/zoneminder.conf
root@DGDEB03:/# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart
root@DGDEB03:/# a2enconf zoneminder
Enabling conf zoneminder.
To activate the new configuration, you need to run:
service apache2 reload
root@DGDEB03:/# service apache2 restart
root@DGDEB03:/# chown -R www-data:www-data /usr/share/zoneminder/
root@DGDEB03:/# service apache2 reload
root@DGDEB03:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 28G 23G 4.1G 85% /
udev 10M 0 10M 0% /dev
tmpfs 199M 5.1M 194M 3% /run
tmpfs 497M 496K 497M 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 497M 0 497M 0% /sys/fs/cgroup
/dev/sda1 511M 132K 511M 1% /boot/efi
tmpfs 100M 12K 100M 1% /run/user/118
tmpfs 100M 20K 100M 1% /run/user/1000
root@DGDEB03:/# zmupdate.pl -h
Unknown option: h
Usage:
zmupdate.pl -c,--check | -f,--freshen | -v<version>,--version=<version> [-u<dbuser> -p<dbpass>]
Options:
-c, --check - Check for updated versions of ZoneMinder
-f, --freshen - Freshen the configuration in the database. Equivalent of old zmconfig.pl -noi
--migrate-events - Update database structures as per USE_DEEP_STORAGE setting.
-v<version>, --version=<version> - Force upgrade to the current version from <version>
-u<dbuser>, --user=<dbuser> - Alternate DB user with privileges to alter DB
-p<dbpass>, --pass=<dbpass> - Password of alternate DB user with privileges to alter DB
-d<dir>,--dir=<dir> - Directory containing update files if not in default build location
-interactive - interact with the user
-nointeractive - do not interact with the user
root@DGDEB03:/# zmupdate.pl -c
root@DGDEB03:/# zmupdate.pl
Initiating database upgrade to version 1.29.0 from version 1.28.1
Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop : ^C
root@DGDEB03:/# systemctl stop zoneminder.service
root@DGDEB03:/# zmupdate.pl
Initiating database upgrade to version 1.29.0 from version 1.28.1
Please ensure that ZoneMinder is stopped on your system prior to upgrading the database.
Press enter to continue or ctrl-C to stop :
Do you wish to take a backup of your database prior to upgrading?
This may result in a large file in /tmp/zm if you have a lot of events.
Press 'y' for a backup or 'n' to continue : n
Upgrading database to version 1.29.0
Loading config from DB
Saving config to DB
Upgrading DB to 1.28.99 from 1.28.1
Database successfully upgraded to version 1.28.99.
Upgrading DB to 1.28.100 from 1.28.1
Database successfully upgraded to version 1.28.100.
Upgrading DB to 1.28.101 from 1.28.1
Database successfully upgraded to version 1.28.101.
Upgrading DB to 1.28.102 from 1.28.1
Database successfully upgraded to version 1.28.102.
Upgrading DB to 1.28.103 from 1.28.1
Database successfully upgraded to version 1.28.103.
Upgrading DB to 1.28.104 from 1.28.1
Database successfully upgraded to version 1.28.104.
Upgrading DB to 1.28.105 from 1.28.1
Database successfully upgraded to version 1.28.105.
Upgrading DB to 1.28.106 from 1.28.1
Database successfully upgraded to version 1.28.106.
Upgrading DB to 1.28.107 from 1.28.1
Database successfully upgraded to version 1.28.107.
Upgrading DB to 1.28.108 from 1.28.1
Database successfully upgraded to version 1.28.108.
Upgrading DB to 1.28.109 from 1.28.1
Database successfully upgraded to version 1.28.109.
Upgrading DB to 1.28.110 from 1.28.1
Database successfully upgraded to version 1.28.110.
Upgrading DB to 1.29.0 from 1.28.1
Database successfully upgraded to version 1.29.0.
Database upgrade to version 1.29.0 successful.
root@DGDEB03:/#
https://wiki.zoneminder.com/Common_Issu ... PA_version
to fix DB issues, but when i now try to login, the login page returns, nothing more...
Or you try login with admin, instead of root .... duhuu ...
--
Looks like it works like a charm again ...

Next setup ZoneMinder with steady HD room, as purging will delete everything?? How stupid, thought it could be set to 'keep' some days of events ...
And we're facing the blurry camera within ZoneMinder again, which has no problem @ all within Gnome GUI's Cheese cam program ...
/dev/video0 - does not work anymore after upgrade?
I faced this issue earlier and solved this, but that story is most probably on my crashed HD

Camera does work perfectly with Cheese within Xorg Gnome, but won't work with ZoneMinder ...
--
DG.