I was asked to rephrase this posting as it was mistakenly confused with another question. So here is the rewrite:
I upgraded my server to 17.10. I had to run a2enmod to fix the php7.1 problem as mentioned elsewhere, and then everything worked fine - which I knew because the website was written in PHP and it worked as before. The only thing that was broken was phpmyadmin. When I ran it, all I got is a bunch of text. I tried purging it from the system and then reinstalling it, but no no avail.