Looked at all the articles on search for this and no answers that work -- on Ubuntu 16.04 I\'m getting:
PHP Warning: PHP Startup: Unable to load dynami
It seems that uninstalling all versions of php with
sudo apt-get purge `dpkg -l | grep php | awk '{print $2}' | tr "\n" " "``
and only installing the latest version with
apt install php libapache2-mod-php php-mysql php-xml php-soap php-gd php-mbstring
solved the problem for me.