Ubuntu 16.04 Release with Zoneminder 1.29.0

Forum for questions and support relating to the 1.29.x releases only.
bbunge
Posts: 2270
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Sat Apr 30, 2016 11:12 pm

iconnor wrote:You havn't set the timezone is the right php.ini file. Normally the one you need to edit is /etc/php/apache2/php.ini
For Ubuntu 16.04 it is: nano /etc/php/7.0/apache2/php.ini


With that said it may be different if you have done an upgrade. However, I have not successfully upgraded a running ZM Ubuntu install to 16.04 since the official release. Am having issues with MySQL going from 5.5 (14.04) or 5.6 (15.10) to 5.7 (16.04). Will get it to work in time...

Sigge
Posts: 89
Joined: Mon May 02, 2016 8:14 am

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by Sigge » Mon May 02, 2016 8:23 am

Hi and thanks for the instructions.

I ran in to a lot of trubble from anouther service blocking the install of mysql. Solved that but I am now unable to start apache2.

Anyone knows what the problem is? PHP not properly installed?

Log:
apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since lun 2016-05-02 09:57:47 CEST; 6min ago
Docs: man:systemd-sysv-generator(8)
Process: 1225 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

mag 02 09:57:47 BERTILIT apache2[1225]: * The apache2 configtest failed.
mag 02 09:57:47 BERTILIT apache2[1225]: Output of config test was:
mag 02 09:57:47 BERTILIT apache2[1225]: AH00526: Syntax error on line 11 of /etc/apache2/conf-enabled/zoneminder.conf:
mag 02 09:57:47 BERTILIT apache2[1225]: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
mag 02 09:57:47 BERTILIT apache2[1225]: Action 'configtest' failed.
mag 02 09:57:47 BERTILIT apache2[1225]: The Apache error log may have more information.
mag 02 09:57:47 BERTILIT systemd[1]: apache2.service: Control process exited, code=exited status=1
mag 02 09:57:47 BERTILIT systemd[1]: Failed to start LSB: Apache2 web server.
mag 02 09:57:47 BERTILIT systemd[1]: apache2.service: Unit entered failed state.
mag 02 09:57:47 BERTILIT systemd[1]: apache2.service: Failed with result 'exit-code'.

Thanks!

SteveGilvarry
Posts: 416
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by SteveGilvarry » Mon May 02, 2016 9:19 am

sudo apt-get install libapache2-mod-php
Production Zoneminder 1.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

Sigge
Posts: 89
Joined: Mon May 02, 2016 8:14 am

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by Sigge » Mon May 02, 2016 11:49 am

Thanks but it did not work:

libapache2-mod-php is already the newest version (1:7.0+35ubuntu6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

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

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by MJN » Mon May 02, 2016 12:31 pm

You might need to enable it:

Code: Select all

sudo a2enmod php

(Might need to check the 'php' descriptor - I'm not at my machine right now to check the exact name)

SteveGilvarry
Posts: 416
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by SteveGilvarry » Mon May 02, 2016 12:32 pm

Is it enabled? That error is saying it doesn't understand php_flag, which is a perfectly legitimate command in zoneminder.conf if php module is loaded.

apachectl -M should see php7_module in the list.
Production Zoneminder 1.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

SteveGilvarry
Posts: 416
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by SteveGilvarry » Mon May 02, 2016 12:55 pm

Once you get it working, i.e. you know php is loaded and working, then delete this line

Code: Select all

php_flag register_globals off
from zoneminder.conf. It is deprecated in PHP 5.4, that is register_globals is always off.
Production Zoneminder 1.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

bbunge
Posts: 2270
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Mon May 02, 2016 1:13 pm

I've just gotten an upgrade from Ubuntu 14.04 - ZM 1.29.0 to 16.04 - 1.29.0 to work. Folks, it was not pretty! I need to do it again to document the steps. I, too, had a problem with the php_flag... which I'll tell you how to fix when I get it written up.

bb

Sigge
Posts: 89
Joined: Mon May 02, 2016 8:14 am

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by Sigge » Mon May 02, 2016 2:08 pm

Commenting it away makes the apache2 server start.

But localhost/zm is blank.

I created a /var/www/html/info.php conaining:

<?php
phpinfo();
?>

and that is blanc as well.

I think there is some problem with PHP?

Thanks,

bbunge
Posts: 2270
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Mon May 02, 2016 2:17 pm

Sigge wrote:Commenting it away makes the apache2 server start.

But localhost/zm is blank.

I created a /var/www/html/info.php conaining:

<?php
phpinfo();
?>

and that is blanc as well.

I think there is some problem with PHP?

Thanks,
Did you try to do an upgrade? If so you will have issues which I am working on.

If you did a fresh install of Ubuntu 16.04 these instructions work: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

SteveGilvarry
Posts: 416
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by SteveGilvarry » Mon May 02, 2016 2:26 pm

You literally did the last thing I suggested, I did say once you get it working then you can comment it out.

apachectl -M and check if any php entries listed.
Production Zoneminder 1.32.3
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

Sigge
Posts: 89
Joined: Mon May 02, 2016 8:14 am

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by Sigge » Mon May 02, 2016 2:32 pm

@SteveGilvary: I did all but apachectl -M did not work with apache down.

Now:

apachectl -M
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgid_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
mime_module (shared)
mpm_event_module (shared)
negotiation_module (shared)
rewrite_module (shared)
setenvif_module (shared)
status_module (shared)

No php?

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

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by MJN » Mon May 02, 2016 2:43 pm

Did you enable it?

bbunge
Posts: 2270
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Mon May 02, 2016 3:06 pm

Upgrade procedure for Ubuntu 14.04 - ZM 1.29.0 to Ubuntu 16.04 - ZM 1.29.0 is ready. See:
https://wiki.zoneminder.com/Common_Issu ... untu_16.04

bbunge
Posts: 2270
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Post by bbunge » Mon May 02, 2016 3:11 pm

If your Apache2 is having problems starting in Ubuntu 16.04 with a php_flag error, check that all the required PHP programs are installed:

apt-get install php php-gd libapache2-mod-php php7.0-mysql

You will also need to set your timezone in /etc/php/7.0/apache2/php.ini

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests