phpMyAdmin on Ubuntu 18.04

I had phpMyAdmin version 4.6 something running on php 7.2.24 on Ubuntu 18.04 linux.

I checked the version I had by running the following command in Terminal : apt show phpmyadmin

Package: phpmyadmin
Version: 4:4.6.6-5ubuntu0.5
Priority: extra
Section: universe/web
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Thijs Kinkhorst <thijs@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 25.0 MB

I uninstalled the older version of phpMyAdmin via Terminal and running :

sudo apt remove phpmyadmin

These were originally installed from the Debian repository using Terminal and command line when I setup LAMP .

Do not use the autoremove command if you want the current version of php left in place. I also left the old phpMyAdmin database in place. Because I was not sure if it was needed by the new version.

My current php and phpMYAdmin versions are as shown in the image below

phpMyAdmin error - Warning in ./libraries/sql.lib.php#613

You can refer to this article here. phpMyAdmin never worked properly. When accessing tables in databases I got the following type error.

Warning in ./libraries/sql.lib.php#613

count(): Parameter must be an array or an object that implements Countable etc….

After looking at various articles the best solution I think is the one I found at AskUbuntu.com . See the image below.

How to get rid of phpMyAdmin error - Warning in ./libraries/sql.lib.php#613

It is simple and very effective. And exemplifies the portability of phpMyAdmin. The other methods of removing the installed version of phpMyAdmin and installing a newer version look painful and are not guaranteed as the Debian repository may not have the latest version or version compatible with your current Php version.

Method:

  • Go to the phpMyAdmin website. Download the latest version in zip format (5.0.4 at the time of writing). Copy the hash number as well. This will enable you to verify the integrity of the downloaded file.
  • Verify the hash number. To do this, open Terminal, supply the path where the zip file has been downloaded and type sha256sum filename.zip . Verify the hash number is the same as that supplied by the phpMyAdmin download site. See image below.
  • Unzip the file.
  • Copy the unzipped folder and all it’s contents to your public folder. On Ubuntu 18.04 running Apache 2.4.29 this is in ‘/var/html’ . You can renamed to folder to something shorter if you like.
  • Make a copy of config.sample.inc.php and rename it to config.inc.php.
  • Edit config.inc.php

Make sure you have the authentication part setup correctly as follows to use a cookie and your web server is correctly specified in host.

/* Authentication type */

$cfg['Servers'][$i]['auth_type'] = 'cookie';

/* Server parameters */

$cfg['Servers'][$i]['host'] = 'localhost';

$cfg['Servers'][$i]['compress'] = false;

$cfg['Servers'][$i]['AllowNoPassword'] = false;

  • Save config.inc.php
  • Launch phpMyAdmin by accessing the phpMyAdmin hosted folder.
  • In my case https://localhost/phpMyAdmin5/ You should get the phpMyAdmin login screen. See image below.

All done! 🙂

Spell Check not working in LibreOffice on Ubuntu 18.04

This even though the hunspell dictionary seems to been installed in LibreOffice.

The solution is to open Terminal and

 sudo apt install hunspell-en-gb

Credits

Thanks to @timothy at AskUbuntu.com for the phpMyAdmin solution.

Thanks to TrisquelUser on https://ask.libreoffice.org/en/question/78558/spell-check-not-working/

for the LibreOffice Spell Checker fix.