I have a mix of pages with HTML and PHP content and had installed the PHP module on my Drupal 8.6.4 site. Earlier today it was working fine and I edited several pages, selected PHP, and presto. All was good.
But a couple hours ago, when I went to edit a page, the little "Text Format" pulldown wasn't selected (which was odd, as it had been on PHP before). I went to reselect PHP and saw that's no longer an option. Just the three default HTML text formats.
My PHP module was installed, but not wanting to post wantonly, I thought perhaps it needed to be REinstalled. I uninstalled the module and it's no longer in the list of installed modules.
But the odd thing is I'm getting an error when I try to reinstall saying it's already installed. So it's been uninstalled, but is now stuck: won't reinstall, won't run because it's uninstalled. Is there a flag in the database that I can truncate, perhaps, and get it to reupload the PHP module? Why did the module vanish? (or its functionality!).