PhpMyAdmin 4.7 on Opensuse Leap 42.2 – install PHP 7 and correct some code to avoid errors

Yesterday, I wanted to change to the latest version of PhpMyAdmin (4.7) on my development laptop which runs on Opensuse Leap 42.2. PHP 5.6 was provided via an Apache2 server and php-apache-modules. I downloaded the zipped code package for PhpMyAdmin and performed the usual setup procedure on my local web server. But I met some obstacles both under and after the phpmyadmin installation.

First, I got an error during installation of the following type:

phpmyadmin fatal error: call to undefined function phpseclib\crypt\random::string() in …/phpmyadmin/libraries/config/serverconfigchecks.php on line 226

Changing to PHP 7 – via using the Opensuse repository at helped to overcome this error.

However, be aware of the fact that changing to PHP 7 globally implies a lot of consequences – e.g changing database code in older programs from the the “mysql” to the “mysqli” interface. (Off topic: As long as one wants to use PHP via Apache modules I do not see a way to run both PHP versions in parallel on one Apache2 web server. Things are different with FCGI and PHP-FPM; but I did not experiment with these alternatives, yet. My way to support older programs for the time being actually includes the use of an independent 42.2 LAMP installation on a KVM machine – together with an older 4.3/4.4-version of PhpMyAdmin.]

Another error I stumbled across after installation of PhpMyAdmin 4.7 occured when I tried to use the drop-down boxes for changing pages during the display of large tables. Whenever you use the drop down box a small popup appears complaining about “unmatching tokens”.

The recipe to mend this bug is described by the Phpmyadmin developers on the following Internet page:

One just has to change some lines (at line nr 796) in the file “/InstallationDirOFPhpmyadminOnWebserver/libraries/DisplayResults.php” as described in the above article :

// Comment the following lines at position 796 and replace with the 2 lines shown 
// $table_navigation_html .= '<form action="sql.php'
// . URL::getCommon($_url_params)
// . '" method="post">';
$table_navigation_html .= '<form action="sql.php" method="post">';
$table_navigation_html .= URL::getHiddenInputs($_url_params);

Good luck with PhpMyAdmin 4.7!

KVM, video virtio, Debian 8 guest, host with Intel HD 4000 – install a 4.9 kernel on the guest for optimal 2D graphics performance !

Some time ago I wrote a post about the use of new virtio video driver for a KVM guest with a Debian 8 operative system. See:
KVM, video QXL und video virtio – Video-Auflösung des Gnome-Desktops eines Debian 8-Gastystems einstellen
The KVM host at that time was a PC with a native Nvidia graphics card. In my post I was very positive about the 2D-performance results of the spice/virtio combination for the KVM guest graphics.

Two days ago I had to perform the installation of a Debian 8 KVM guest – this time, however, the host was a laptop with an Optimus system: The internal graphics card of the i7-3632QM CPU was/is an Intel HD Graphics 4000. (The laptop has an additional Nvidia GT645 M, which can be used via Bumblebee.) Under normal conditions the Intel HD graphics (with the i915 kernel module) has sufficient power to support 2D and 3D accelerated GUIs. In my case the laptop ran on Opensuse Leap 42.2, qemu-kvm was of version 2.9, libvirt of version 3.3 (installed from the “virtualization”-repository: But this time I got a bit disappointed.

Disappointing 2D-graphics performance of the Debian8 KVM guest with kernel 3.6, with spice/QXL and spice/virtio

I experienced two problematic points with the Debian 8 guest and its original 3.6 kernel:

  • The performance with the Spice/QXL-graphics of the KVM guest was not at all convincing – especially not with GTK-applications (neither on a KDE or Gnome 3 GUI of the guest) at and above guest graphics resolutions 1400×900. I saw tearing of windows during fast movements across the spice terminal screen. Especially disappointing was the performance of Firefox ESR: Sluggish reactions of all kinds of window contents and slow reactions to scrolling of complicated web site contents – especially of running videos. But the QXL driver at least gave me the choice of many, many guest resolutions up to the maximum resolution of the host.
  • The performance was only slightly better with the new “virtio” driver. But the choice of guest resolutions was very limited with a maximum of 1280x768px.

Update to the latest kernel on the Debian 8 guest

I then read on some Internet websites that the virtio graphics driver on qemu/kvm requires a kernel later than version 4.x on the guest system, too. So why not try? The installation of newer kernels on Debian 8 is possible by adding the “backports” repository to apt’s configuration. We have to a add a line

deb jessie-backports main contrib non-free

to /etc/apt/sources.list on the Debian system. The we execute

apt-get update


apt-get install -t jessie-backports linux-image-amd64

to get the latest kernel installed. In my case this is a SMP kernel of version 4.9.18. Up to now this kernel lead to no conflicts or problems with any of the installed software on the Debian 8 guest.

Results of the updated guest with kernel 4.9

The graphical performance of the Debian guest with spice/virtio combination, however, changed dramatically to the better! Actually, the overall 2D-performance is now really convincing – even on the relatively weak Intel HD 4000. The tear free moving of window frames of all kinds of Qt- or Gtk3-applications across the spice terminal is just one point. The other is that the performance impression of e.g. Firefox ESR on the virtualized guest is almost not distinguishable from Firefox on the host’s
KDE interface. Below you see 2 FF windows on the Gnome GUI of the Debian 8 KVM guest plus a QGit window. One FF window plays a video.

And in addition I now get all resolutions I could wish for:

I love KVM! Even on laptops!