'phpMyAdmin databases appear fleetingly then disappear

I am using a Windows PC, but have a LAMP server on a different hard-drive on the same network.

The server uses Ubuntu 20.04.4, Apache2.4.41, MariaDB 10.7, PHP 8.1.3 and phpMyAdmin 5.1.3

On the LAMP server, I have a database serving a Drupal website that I can access from my PC's browser. The database is obviously functioning or the website wouldn't work.

Using SSH, I can access the LAMP server from my PC, and create databases and database users

My problem is phpMyAdmin. In my browser from my PC I can access and log into phpMyAdmin. For a moment, it connects to the databases, and I can see them listed in the left hand column, but after a fraction of a second the databases disappear and I am left with a blank page.

There are lots of messages on sites about not being able to access phpMyAdmin, and lots of messages about not being able to log in. However, I have not been able to find anyone with a problem similar to mine. I can log into it, access it, see it, and even see the names of the databases for a fraction of a second.

As far as I can tell, the 3306 port is open (otherwise I wouldn't be able to access phpMyAdmin) the databases are working correctly (otherwise my website wouldn't work) I'm not being blocked by my Windows anti-virus or my Ubuntu anti-virus.

I've checked various Apache, PHP and phpMyAdmin config files, but as far as I can tell everything is correct... but something obviously isn't.

Can anyone help, or point me in the right direction?

I have checked on different browsers, with the same result, and I have tried clearing the browser cache with the same result.

The Apache error log at /var/log/apache2/error.log shows the following.

[Fri Apr 01 10:06:10.085237 2022] [ssl:warn] [pid 1323] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name [Fri Apr 01 10:06:10.187193 2022] [ssl:warn] [pid 1329] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name [Fri Apr 01 10:06:10.197689 2022] [mpm_prefork:notice] [pid 1329] AH00163: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f configured -- resuming normal operations [Fri Apr 01 10:06:10.197762 2022] [core:notice] [pid 1329] AH00094: Command line: '/usr/sbin/apache2'

Could the error be caused by a self-certificate that does not port 443?

Believing the fault may be in the /etc/phpmyadmin/config.inc.php file, I deleted the whole file.

I then re-created a new /etc/phpmyadmin/config.inc.php file using basic example at https://docs.phpmyadmin.net/en/latest/config.html#basic-example

I then re-started Apache

Then re-accessed sites and phpMyAdmin in new browser. Still the same. Can log into phpMyAdmin and view phpMyAdmin page, but list of databases still appear for a fraction of a second then disappear.

When viewed on the browser using developer tools, I see an error "Uncaught SyntaxError: Unexpected token u in JSON at position 0" This seems identical to the error reported yesterday on https://github.com/phpmyadmin/phpmyadmin/issues/17465



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source