Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPmyadmin pop-up error notice keeps appearing when clicking on columns of databases

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?

like image 685
n.morgana Avatar asked Dec 09 '14 02:12

n.morgana


People also ask

Why does phpMyAdmin show error?

A database connection error means that your phpMyAdmin tool is not able to connect to the MySQL database. Usually, this is because the MAMP phpMyAdmin configuration file has the incorrect settings.

Why database is not showing in phpMyAdmin?

Your app is probably connected using a different, lower privileged user. Try running select user(); from your app and from phpMyAdmin and you will know for sure. Assuming your app is running with a different user, you will need to add privilages for it to access the database you create.

Can not connect phpMyAdmin?

Restart your xampp server. Go to localhost/phpmyadmin again. Try to login with root as username and leave the passwords filed blank. If this doesn't works then login with the password you have entered.

Where is phpMyAdmin configuration?

The configuration files are located in the /etc/phpmyadmin directory. The main configuration file is /etc/phpmyadmin/config. inc. php, which contains the configuration options that apply globally to phpMyAdmin.


3 Answers

Append the following line

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

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

like image 190
zhekanax Avatar answered Oct 12 '22 19:10

zhekanax


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)

like image 28
LetsCMS Pvt Ltd Avatar answered Oct 12 '22 18:10

LetsCMS Pvt Ltd


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

$cfg['SendErrorReports'] = 'never';
like image 19
Abhinav Singh Avatar answered Oct 12 '22 19:10

Abhinav Singh