4.6.6deb5 not working on Bionic as PHP 7.2 is default

Bug #1767361 reported by Michael Bolli
292
This bug affects 65 people
Affects Status Importance Assigned to Milestone
phpmyadmin (Debian)
Fix Released
Unknown
phpmyadmin (Ubuntu)
Undecided
Unassigned

Bug Description

From Bionic Beaver PHP 7.2 is the default.

PhpMyAdmin needs to be updated to at least 4.7.4, as the release notes state that a few PHP 7.2 incompatibilities have been fixed. Better yet 4.8.

https://www.phpmyadmin.net/news/2017/8/24/phpmyadmin-474-released/

With 4.6.6 I get the following error in a table listing for example: Warning in ./libraries/sql.lib.php#613
 count(): Parameter must be an array or an object that implements Countable

tags: added: bionci
tags: added: bionic
removed: bionci
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in phpmyadmin (Ubuntu):
status: New → Confirmed
Changed in phpmyadmin (Debian):
status: Unknown → New
Revision history for this message
Sean Davis (bluesabre) wrote :

The fix outlined in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890595#15 resolves the warnings.

Revision history for this message
JohnShep (john-boxrec) wrote :

worked for me :-) thanks Sean

Revision history for this message
Michael Bolli (michael-bolli-us) wrote :

The fix only removes some of the warnings. In the table/database export tab for instance I still get many warnings.

Revision history for this message
Jbyvosges (j-lbarbry) wrote :

Same as Michael Bolli : I still get many warnings.

Revision history for this message
Carl B. (carlb) wrote :

The latest version is https://files.phpmyadmin.net/phpMyAdmin/4.8.2/phpMyAdmin-4.8.2-all-languages.tar.gz - just grab it from phpMyAdmin's site and drop it in your /var/www/html tree.

I'm disappointed to see that Ubuntu18 (Bionic) is shipping with multiple outdated packages which have PHP 7.2 compatibility issues (I'm having the same or worse issue with php-tcpdf, see bug#1781000) but the quickest solution seems to be to go upstream for current versions of the affected code.

Revision history for this message
Andy Fisher (nuclearfisher) wrote :

Would you guys finally make fucking LAMP working on LTS?
That was a fuckup. Just fix it.

Revision history for this message
Rob Peters (makitso) wrote :

I agree with Andy, quit talking and fix this stupid big

Revision history for this message
Raryel C. Souza (raryel-costa) wrote :

I'm running a VPS with Ubuntu 18.04 and experience similar problems and get quite long error messages (see screenshot). It's pretty annoying to get those errors when switching panels and a maybe a beginner user would be get very scared to use the app afraid that could mess up the database operations...

Considering my alternatives
1) Upgrade to the latest version from the website. The problem is that I would have to update manually... not very convenient for the security maintenance...

2) Do the fix indicated by https://devanswers.co/problem-php-7-2-phpmyadmin-warning-in-librariessql-count/. The problem would be that whenever phpmyadmin got updated the fix would be gone as well.

If backporting those compatibility fixes with php 7.2 shipped with the latest phpmyadmin 4.8 series is not convenient, what about offering on the repositories an extra package with the phpmyadmin 4.8 series so that users could get security updates automatically (in that way people who are happy with 4.6 series don't need to upgrade if they so wish)?

Thanks a lot for the great effort of the development/maintainers community.

Revision history for this message
JohnShep (john-boxrec) wrote :

This is getting to be a pain every server install :-(

Revision history for this message
Andy Fisher (nuclearfisher) wrote :

Are you guys still kidding me?!
Is it a motherfucker problem to make a deb package for phpmyadmin 4.8.x?
For 4 months old LTS release!

Revision history for this message
Rob Peters (makitso) wrote :

I agree with Andy's sentiment. I run phpmyadmin 4.8.3 on several 18.04 systems. Once the tmp directory is defined and the secret error defined its good to go. For a LTS release this should have been fixed.

Revision history for this message
Maxwell Dreytser (admik) wrote :

Fast forward to End of October 2018 and this is STILL an issue.

This is really a 20 minute job so it is simply inconceivable that Ubuntu would stoop so low. This is A HIGHLY USED APPLICATION! Don't you forget that 18.04 is an LTS, that is supposedly more stable. It is simply DISGUSTING what happened to 18.04.

Revision history for this message
Manfred Hampl (m-hampl) wrote :

@Maxwell Dreytser:
If you think that this is a 20 minute job, please help solving it, e.g. by creating a package in a PPA.

Looking at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890595 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879741 the task seems to require far more work.

Revision history for this message
diablo60 (eldiablo62) wrote :

I have the same problem with export and click on a table. Please could you upgrade the package version ?

Changed in phpmyadmin (Debian):
status: New → Confirmed
Revision history for this message
diablo60 (eldiablo62) wrote :

Hi is it possible to solve it's verry difficult to use phpmyadmin on ubuntu 18.04 we have always a modal with the errors. We use highly phpmyadmin on many servers.

Revision history for this message
Johnny Berentsen (johnny) wrote :

FWIW, I patch phpMyAdmin using these two lines after installation:
perl -p -i -e "s/\[\'select_expr\'\] == 1\)/\[\'select_expr\'\]\) == 1/g" /usr/share/phpmyadmin/libraries/sql.lib.php
perl -p -i -e "s/ count\(/ count\(\(array\)/g" /usr/share/phpmyadmin/libraries/plugin_interface.lib.php

I've not seen any negative side effects, but I am not an heavy user either so YMMV

Revision history for this message
david (drtechno1971) wrote :

Line #613 of sql.lib.php should be:

            || (count($analyzed_sql_results['select_expr']) == 1

line #551 of plugin_interface.lib.php should be:

if ($options != null && count((array)$options) > 0) {

Please patch upstream on all debain based distros
thanks

Revision history for this message
Matti Viljanen (direc85) wrote :

Hi all,

I git-cloned the source and created a quick and dirty patch that should fix the issue, at least in spots. For me, now I can browse tables without warnings, and use export functionality.

I am not sure if there are more incompatibilities, but these are the ones I faced just today.

Source: mostly https://stackoverflow.com/questions/48001569/phpmyadmin-count-parameter-must-be-an-array-or-an-object-that-implements-co but the knowledge is widespread by now.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Improve PHP 7.2 compatibility" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
rasos (rasos) wrote :

We should not be offered just a patch, but a php 7.2 compatible phpmyadmin release, please!

Revision history for this message
William Desportes (williamdes) wrote :

We are working on packaging the latest version of phpMyAdmin at Debian (https://salsa.debian.org/phpmyadmin-team/phpmyadmin/issues/1)

Issue: https://github.com/phpmyadmin/phpmyadmin/issues/15236#issuecomment-502392098

For now you can use the PPA https://launchpad.net/~phpmyadmin/+archive/ubuntu/ppa

I hope this will solve the issue you have

Revision history for this message
Dave Pusey (davepusey) wrote :

I can confirm that the following sequence of commands worked on both of my 1804 LTS servers that were affected by this issue...

add-apt-repository ppa:phpmyadmin/ppa
apt-get clean
apt-get update
apt-get purge phpmyadmin
apt-get install phpmyadmin

Changed in phpmyadmin (Ubuntu):
status: Confirmed → Fix Released
Changed in phpmyadmin (Debian):
status: Confirmed → Fix Released
Revision history for this message
Austin Dunham (wardred) wrote :

It says this is fixed/released in Ubuntu.
I'm running Ubuntu 18.04.5 LTS
I'm still seeing phpmyadmin Version information: 4.6.6deb5

Is this only fixed in the non-LTS version of Ubuntu?
I've done apt-get update, but that doesn't seem to bring down a new version of the software.
I can add the PPA if I have to, but I'm wondering if there's something else I'm missing here.

Revision history for this message
Austin Dunham (wardred) wrote :

I re-read William Desportes's comment #22 and the fix is in Debian's buster-backports repository.
It does not appear to be in Ubuntu's bionic-backports.

I'm not sure if this is right, but it may be simpler to apply the patch that's attached to this bug rather than trying to use a backport from a whole different, if related, distro.

Revision history for this message
William Desportes (williamdes) wrote :

Hi Austin,

Why not trying our PPA (#23) ?

For now users have reported being able to use it on Bionic :)

Revision history for this message
Austin Dunham (wardred) wrote :

Hi William,
   I realize I never responded.
   I ended up using the PPA on Ubuntu 18.04 and it's working.

Revision history for this message
Alexander Korsunsky (akors) wrote :

It is now 2021 and the bug is still there.

Dear maintainers, please please with cherry on top: can we get this 2-line patch into the bionic repositories somehow?

Revision history for this message
William Desportes (williamdes) wrote :

Hi,

We can not do such updates, but you can use our Ubuntu PPA.
See: https://github.com/phpmyadmin/phpmyadmin/wiki/DebianUbuntu

Hope this helps you :)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.