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?

2
  • Which phpMydmin version? Dec 10, 2014 at 3:59
  • Latest version at the moment (4.3.10)
    – n.morgana
    Dec 11, 2014 at 12:34

10 Answers 10

101

Append the following line

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

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

6
  • 3
    Thanks, it worked... I hate this annoyance, because the report shows only notices anyway, not the actual errors.
    – Anonymous
    Dec 9, 2014 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, 2015 at 14:27
  • 4
    I found this in /etc/phpmyadmin/config.inc.php. It worked perfectly.
    – David
    Oct 14, 2017 at 19:53
  • 2
    You need to add if not available line. For me it was not available. Nov 29, 2018 at 21:21
  • I found it in /usr/local/cpanel/base/3rdparty/phpMyAdmin and it's work , thanks
    – HasH
    Feb 19, 2020 at 12:30
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)

3
  • 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, 2019 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! Sep 4, 2019 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 6, 2020 at 23:10
20

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

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

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

$cfg['SendErrorReports'] = 'never';
1
  • On which line exactly?
    – Egidius
    Nov 4, 2021 at 12:51
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';
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

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.

1
  • This is the most underrated solution in this thread. Updating my phpMyAdmin fixed all the errors I was getting. Thank you.
    – Eje
    Feb 25, 2020 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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.