Page 3 of 5

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Sat Apr 30, 2016 11:12 pm
by bbunge
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...

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 8:23 am
by Sigge
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!

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 9:19 am
by SteveGilvarry
sudo apt-get install libapache2-mod-php

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 11:49 am
by Sigge
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.

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 12:31 pm
by MJN
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)

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 12:32 pm
by SteveGilvarry
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.

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 12:55 pm
by SteveGilvarry
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.

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 1:13 pm
by bbunge
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

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 2:08 pm
by Sigge
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,

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 2:17 pm
by bbunge
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

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 2:26 pm
by SteveGilvarry
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.

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 2:32 pm
by Sigge
@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?

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 2:43 pm
by MJN
Did you enable it?

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 3:06 pm
by bbunge
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

Re: Ubuntu 16.04 Release with Zoneminder 1.29.0

Posted: Mon May 02, 2016 3:11 pm
by bbunge
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