Link to the file:
https://drive.google.com/open?id=1QjvVe ... vXBASFXnNY
You should be able to use this script to "rescue" your install. Since Ubuntu 18.04 uses PHP 7.2 the procedure should work. You can also upgrade to ZM 1.32.1.
#!/bin/sh
clear
read -p "This script rescues Zoneminder 1.30.4 after an upgrade from Ubuntu 16.04 to Ubuntu 18.04
Press Enter to continue or Ctrl + c to quit" nothing
clear
read -p "You must be logged in as root using sudo su ...
Press Enter to continue or Ctrl + c to quit" nothing
clear
read -p "Next we will download and apply the fixed api package. This may take a minute to connect
Press enter to continue" nothing
wget --no-check-certificate '
https://docs.google.com/uc?export=downl ... vXBASFXnNY' -O /tmp/api.fixed.tar.gz
tar -zxvf /tmp/api.fixed.tar.gz -C /tmp/
mv /usr/share/zoneminder/www/api /usr/share/zoneminder/www/api.org
mv /tmp/api /usr/share/zoneminder/www/api
chown -R www-data:www-data /usr/share/zoneminder/
read -p "Next we will add time zone to PHP config files.
Press enter to continue" nothing
awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini
clear
read -p "Now we will make sure Apache is configured for Zoneminder and restart it.
Press enter to continue" nothing
adduser www-data video
a2enmod cgi
a2enconf zoneminder
a2enmod rewrite
chown -R www-data:www-data /usr/share/zoneminder/
service apache2 reload
clear
read -p "Zoneminder should now work!.
Press enter to continue" nothing