48

I keep receiving a pop-up error, when clicking on columns in databases:

Some errors have been detected on the server, please look at the bottom of this window.

Notice in .\libraries\tbl_columns_definition_form.inc.php#55 Undefined variable: server

Backtrace

.\libraries\structure.lib.php#2433: include(.\libraries\tbl_columns_definition_form.inc.php) .\tbl_structure.php#45: PMA_displayHtmlForColumnChange( string 'registration', string 'users', NULL, string 'tbl_structure.php', )

How to solve this matter?

Eje
  • 354
  • 4
  • 8
n.morgana
  • 609
  • 1
  • 5
  • 5

10 Answers10

101

Append the following line

 $cfg['SendErrorReports'] = 'never';

inside /etc/phpmyadmin/config.inc.php file to disable this annoying window.

Arun Kumar N
  • 1,611
  • 1
  • 20
  • 25
zhekanax
  • 1,261
  • 1
  • 9
  • 9
  • 3
    Thanks, it worked... I hate this annoyance, because the report shows only notices anyway, not the actual errors. – Anonymous Dec 09 '14 at 12:33
  • I started getting errors after an update to pma. Might have something to do with MariaDB incompatibility in updated versions mine is `Version: 4:3.4.11.1-2+deb7u1` This solution does effectively work around it. – Ray Foss Nov 24 '15 at 14:27
  • 4
    I found this in `/etc/phpmyadmin/config.inc.php`. It worked perfectly. – David Oct 14 '17 at 19:53
  • 2
    You need to add if not available line. For me it was not available. – Ravindra Singh Nov 29 '18 at 21:21
  • I found it in `/usr/local/cpanel/base/3rdparty/phpMyAdmin ` and it's work , thanks – hashem sheikhypour Feb 19 '20 at 12:30
  • Wait a minute; isn't this just window dressing? Hiding the error never fixes the problem. Unless you are saying the error isn't actually a problem which is a different thing. – Sablefoste Jun 07 '21 at 13:23
28

This error is caused by a line of code in /usr/share/phpmyadmin/libraries/sql.lib.php.

It seems when I installed phpMyAdmin using apt, the version in the repository (phpMyAdmin v4.6.6) is not fully compatible with PHP 7.2. There is a newer version available on the official website (v4.8 as of writing), which fixes these compatibility issues with PHP 7.2.

You can download the latest version and install it manually or wait for the repositories to update with the newer version.

Alternatively, you can make a small change to sql.lib.php to fix the error.

Firstly, backup sql.lib.php before editing.

sudo cp /usr/share/phpmyadmin/libraries/sql.lib.php /usr/share/phpmyadmin/libraries/sql.lib.php.bak

Edit sql.lib.php using vi:

sudo vi /usr/share/phpmyadmin/libraries/sql.lib.php

Using nano:

sudo nano /usr/share/phpmyadmin/libraries/sql.lib.php

Press CTRL + W (for nano) or ? (for vi/vim) and search for:

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

Replace it with:

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

Save file and exit. (Press CTRL + X, press Y and then press ENTER for nano users / hit ESC then type :wq and press ENTER)

Eje
  • 354
  • 4
  • 8
LetsCMS Pvt Ltd
  • 634
  • 5
  • 7
  • 2
    Awesome, that fixed it! Only thing I'd like to add it that you can use more user friendly editor to edit that file, I used sublime: `sudo subl /usr/share/phpmyadmin/libraries/sql.lib.php` – Armin Jun 22 '19 at 16:13
  • 2
    I think that if you cannot update the version of phpmyadmin, then this is the best solution. Rather than disable error reporting, just fix the issue, cheers! – Victor Parmar Sep 04 '19 at 18:01
  • 3
    It is February 2020 now, almost two years after the original answer is posted, and `apt` is still distributing **phpMyAdmin** version **4.6.6**. I know open-source projects take a while, but come-on, this is important stuff!!! – Greeso Feb 06 '20 at 23:10
20

Just add this line in /etc/phpmyadmin/config.inc.php

$cfg['SendErrorReports'] = 'never';
Jignesh Joisar
  • 13,720
  • 5
  • 57
  • 57
Abhinav Singh
  • 209
  • 2
  • 4
12

if exists then update other wise add this line in /etc/phpmyadmin/config.inc.php file

$cfg['SendErrorReports'] = 'never';
Jignesh Joisar
  • 13,720
  • 5
  • 57
  • 57
6

Strangely, none of the above solutions worked for me.

So I had to edit this file:

sudo vim /usr/share/phpmyadmin/libraries/common.inc.php

Which is getting included in every phpmyadmin script files.

And place this line at the very bottom:

 $cfg['SendErrorReports'] = 'never';
Sumit Wadhwa
  • 2,825
  • 1
  • 20
  • 34
3

for me it worked....

just add this line $cfg['SendErrorReports'] = 'never'; inside C:\xampp\phpMyAdmin/config.inc.php
(FOR WINDOWS!!!!)

and /etc/phpmyadmin/config.inc.php for other

Santosh Dangare
  • 685
  • 1
  • 4
  • 15
2

I just solved the same problem, every time I enter on my database tables that errors occurs. It seems that PhpMyadmin is not compatible with php version. I have php 7.3 upgrade from 7.0 and NOW PhpMyadmin 4.8.5 from 4.6.

KirtJ
  • 550
  • 7
  • 7
  • This is the most underrated solution in this thread. Updating my phpMyAdmin fixed all the errors I was getting. Thank you. – Eje Feb 25 '20 at 21:33
1

Its a php and phpMyAdmin compatibility issue.

Which PHP versions does phpMyAdmin support? https://docs.phpmyadmin.net/en/latest/faq.html#faq1-31 Could be helpful.

Eitherway, you can turn off Error Reporting by adding the rule below to your config.inc.php and your errors will disappear.

$cfg['SendErrorReports'] = 'never';

If you are using WampServer on Windows, you can find the file here C:\wamp64\apps\phpmyadmin5.1.1\config.inc.php.

C:\ is your disk where you have installed wampserver and phpmyadmin5.1.1 is my version. This will be variable based on the phpMyAdmin version in your local server.

For those using Xampp, your file is here C:\xampp\phpMyAdmin/config.inc.php.

Kelvin Mboto
  • 361
  • 6
  • 15
0

no need to do any thing in ubunto just set SQL compatibility mode: =MYSQ40 while importing your tables. it solved my problem

0

just add this line $cfg['SendErrorReports'] = 'never'; inside C:\xampp\phpMyAdmin/config.inc.php (FOR WINDOWS!!!!) It's work for me

Yassine Moumen
  • 109
  • 1
  • 4