Blank index.php after upgrade to Ubuntu 16.04

Forum for questions and support relating to the 1.29.x releases only.
Locked
Steveearle86
Posts: 16
Joined: Wed Oct 28, 2015 1:19 pm

Blank index.php after upgrade to Ubuntu 16.04

Post by Steveearle86 »

Hi all,
I have been running Zoneminder 1.29 on Ubuntu 15.10 with no problems. Today I upgraded my Ubuntu installation to 16.04 using the following commands

Code: Select all

apt-get update
apt-get upgrade
apt-get dist-upgrade
sudo apt-get install update-manager-core
sudo do-release-upgrade
Once the system had finally done the upgrade and restarted, when I navigate to 127.0.0.1/zm on the Ubuntu PC ZM is installed on I get a blank page. The same is true when substituting the 127.0.0.1 with the server's IP from a different machine.

When I navigate to the default Apache page, I get the usual default page.

I checked the zoneminder service and it is running. Restarted it and still nothing.

After a bit of Googling I tried the following fixes:

Code: Select all

rm /etc/mysql/my.cnf 
cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf

gedit /etc/mysql/my.cnf
added the following line at 32

Code: Select all

sql_mode = NO_ENGINE_SUBSTITUTION
restarted the PC and still nothing

tried the fix here and set short_open_tag to on

but still nothing after a reboot.

I can see from the directory where I store my images that they are still being written so zoneminder itself is running as expected therefore I think it's likely to be something on the Apache side.

Can anyone help?
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Blank index.php after upgrade to Ubuntu 16.04

Post by SteveGilvarry »

OK so assuming apache config is still OK and points to where php files live, and reloaded
Maybe check the wiki https://wiki.zoneminder.com/Ubuntu has some notes on upgrading.
I would also be looking at php install status if something between php5 and php7, check apache php module is enabled etc.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Blank index.php after upgrade to Ubuntu 16.04

Post by bbunge »

Steveearle86
Posts: 16
Joined: Wed Oct 28, 2015 1:19 pm

Re: Blank index.php after upgrade to Ubuntu 16.04

Post by Steveearle86 »

Hi both,
Thanks for your replies. I looked at the Ubuntu 15.10 with ZM 1.29.0 from the PPA to Ubuntu 16.04 section on the Common Issues with Zoneminder Installation on Ubuntu link and carried out the steps to no avail. I can confirm my PHP version according to

Code: Select all

php -v
is PHP 5.6.11-1ubuntu3.4 (cli).
Also it doesnt look like the apache php modules is enabled :

Code: Select all

 apache2ctl -M | sort
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
 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)
 cgi_module (shared)
 core_module (static)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 http_module (static)
Loaded Modules:
 log_config_module (static)
 logio_module (static)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 so_module (static)
 status_module (shared)
 unixd_module (static)
 version_module (static)
 watchdog_module (static)
Is this a PHP issue or an Apache issue!? I could retry upgrading PHP if that would help?
bbunge
Posts: 2956
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Blank index.php after upgrade to Ubuntu 16.04

Post by bbunge »

16.04 should install php7 and that is what you need to look for. Those procedures were done for the initial release of 16.04 and I have not rerun them with 16.04-1 so something could have changed. You might try to force a reinstall of Zoneminder, manually install php7 and upgrade the ZM database. see https://wiki.zoneminder.com/Common_Issu ... untu_16.04
rkozsan
Posts: 2
Joined: Mon Oct 10, 2016 2:27 pm

Re: Blank index.php after upgrade to Ubuntu 16.04

Post by rkozsan »

I am also seeing the same thing as Steveearle86 after upgrading to 16.04.1. Checked all of the same things -no luck.
Mine install is on PHP 7.
Like Steveearle86, apache did not have a lib php module installed/active... turns out, the install of libapache2-mod-php / libapache2-mod-php7.0 fails.

Anyone seen this?
rkozsan
Posts: 2
Joined: Mon Oct 10, 2016 2:27 pm

Re: Blank index.php after upgrade to Ubuntu 16.04

Post by rkozsan »

This provided valuable clues to the apache php module install issue: https://bugs.launchpad.net/ubuntu/+sour ... ug/1576334

Zoneminder index.php still blank (<body> section empty)
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Blank index.php after upgrade to Ubuntu 16.04

Post by knight-of-ni »

Steveearle86 wrote:Hi both,
Thanks for your replies. I looked at the Ubuntu 15.10 with ZM 1.29.0 from the PPA to Ubuntu 16.04 section on the Common Issues with Zoneminder Installation on Ubuntu link and carried out the steps to no avail. I can confirm my PHP version according to

Code: Select all

php -v
is PHP 5.6.11-1ubuntu3.4 (cli).
Also it doesnt look like the apache php modules is enabled :
Like bbunge said earlier, this right here is your first problem. During the upgrade to Ubuntu 16.04, your php should have been upgraded to php 7, but you've shown us that is was not. Fixing this should be your first priority. The zoneminder documentation in the wiki is not going to help you unless you have the same version of php in which the documentation was written.

Once that you've got the correct version of php on your machine, then you need to look at the contents of your Apache log files for errors if the web console is still blank.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Steveearle86
Posts: 16
Joined: Wed Oct 28, 2015 1:19 pm

Re: Blank index.php after upgrade to Ubuntu 16.04

Post by Steveearle86 »

Hi all,
Just a note, I thought it easier to do a complete reinstall of Ubuntu and ZM which has fixed the issue. This also fixed some API issues I was having and the system also seems way more stable!
Locked