Ubuntu 16.04 Release with Zoneminder 1.29.0

Forum for questions and support relating to the 1.29.x releases only.
User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by MJN »

May 24 20:05:02 dvr apache2[567]: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
Is the PHP Apache module loaded?

Code: Select all

$ a2query -m php7.0
php7.0 (enabled by unknown)
If not, enable it with:

Code: Select all

a2enmod php7.0
Zsolt
Posts: 12
Joined: Sun Mar 08, 2015 1:56 pm

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by Zsolt »

Seems not

Code: Select all

root@dvr:/home/kamera# a2query -m php7.0
No module matches php7.0
root@dvr:/home/kamera# a2enmod php7.0
ERROR: Module php7.0 does not exist!
how can I enable it?
User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by MJN »

You can install it with:

Code: Select all

apt install libapache2-mod-php7.0
Zsolt
Posts: 12
Joined: Sun Mar 08, 2015 1:56 pm

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by Zsolt »

Thanks, running that command gave me a huge amount of errors.
Ended up purging php* and libapache2, and reinstalling both. Now it works.

Thanks for your time!

Update:

after a few minutes ZM stopped working. I cant start the service via console NOR web.
The website shows me that ZM is stopped, via console:

Code: Select all

root@dvr:/home/kamera# service zoneminder start
Job for zoneminder.service failed because the control process exited with error code. See "systemctl status zoneminder.service" and "journalctl -xe" for details.

Code: Select all

root@dvr:/home/kamera# systemctl status zoneminder.service
● zoneminder.service - ZoneMinder CCTV recording and surveillance system
   Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2016-05-24 21:53:34 EEST; 1min 11s ago
  Process: 2894 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255)

May 24 21:53:23 dvr sudo[2910]: pam_unix(sudo:session): session opened for user www-data by (uid=0)
May 24 21:53:23 dvr zmdc[2913]: INF [Server starting at 16/05/24 21:53:23]
May 24 21:53:26 dvr zmdc[2913]: FAT [Can't bind: No such file or directory]
May 24 21:53:33 dvr zmdc[2911]: FAT [Can't connect: No such file or directory]
May 24 21:53:34 dvr sudo[2910]: pam_unix(sudo:session): session closed for user www-data
May 24 21:53:34 dvr zmpkg[2894]: ERR [Unable to run "sudo -u www-data /usr/bin/zmdc.pl startup", output is "Starting server"]
May 24 21:53:34 dvr systemd[1]: zoneminder.service: Control process exited, code=exited status=255
May 24 21:53:34 dvr systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
May 24 21:53:34 dvr systemd[1]: zoneminder.service: Unit entered failed state.
May 24 21:53:34 dvr systemd[1]: zoneminder.service: Failed with result 'exit-code'.

Last edited by Zsolt on Tue May 24, 2016 6:55 pm, edited 1 time in total.
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge »

Looks like you need to start over...again

https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

Follow the instructions to the letter! Make sure you install the server version of Ubuntu 16.04 and include LAMP (from tasksel) which will get Apache, PHP and MySQL set up and running from the start. About the only choice you have to make is to use MySQL or Mariadb and I've covered the steps for both. If you get to the end and can't see the Zonemnder web page you did not follow the instructions. Setting up the cameras could give you problems but remember Google is your friend...

bb
User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by MJN »

It looks like permissions issue - check that /tmp/zm is owned by www-data.
Zsolt
Posts: 12
Joined: Sun Mar 08, 2015 1:56 pm

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by Zsolt »

Reinstalled again and it works. It looks like I missed something.
Even the cameras work ;)
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge »

Zsolt wrote:Reinstalled again and it works. It looks like I missed something.
Even the cameras work ;)
Ah... when all else fails...

Glad it works for you!
hitls01
Posts: 1
Joined: Fri Aug 05, 2016 10:02 am

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by hitls01 »

Will these install instructions work with 16.04 desktop version?
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge »

hitls01 wrote:Will these install instructions work with 16.04 desktop version?
Yes! See the WIKI for more info about desktop versions.
Rapheal
Posts: 13
Joined: Sat Apr 21, 2018 6:44 am

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by Rapheal »

Hi Philip,

Try this :
nano /etc/php/7.0/apache2/php.ini
Search for [Date] (Ctrl + w then type Date and press Enter) and make changes as follows for your time zone. Be sure to remove the ; before date.timezone

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
Ctrl+o Enter to save

CTRL+x to exit
Locked