A web interface for MySQL and MariaDB
GNU General Public License v2.0
6498
285
3298

Steps to reproduce

  1. Log in to a phpMyAdmin (I am using MySql)
  2. Export the database using any option that includes structure
  3. Set comparability mode to MSSQL
  4. Ensure that "Enclose table and column names with backquotes" is checked
  5. Perform export and look at SQL file

Expected behavior

File should include proper database create commands. For example I have a table named "SystemSettings" that contains the columns "indexA" "valueA" I would expect the Create command to create a table with those columns. The SQL should be similar to:

CREATE TABLE SystemSettings (
  indexA smallint(5) UNSIGNED NOT NULL,
  valueA varchar(128) COLLATE utf8_unicode_ci NOT NULL
)

Actual behavior

The output produced is:
Table structure for table "SystemSettings"
CREATE TABLE "SystemSettings" ;

which does not produce any columns in the table.

If I uncheck the "enclose table and column names with backquotes" it produces better results however it still seems to drop certain columns on some tables.

Server configuration

Operating system:
Web server:
FreeBSD10.3 AMD64
Database:
MySql 5.6.31-log
PHP version:
unknown shared hosting (sorry!)
phpMyAdmin version:
4.6.6

Client configuration

Browser:
Chrome
Operating system:
Windows 7 or 10

The field "Number of lines" doesn't have any effect:
image
When I change it, it always shows the number of rows selected before in Search screen or Browse screen (25 for me).
Even lowering such value doesn't have any effect.

Changing the number of rows before clicking GIS visualization works:
image
image
And now, it finally shows more polygons.

It was very counterintuitive and took time to figure it out, I think this is an UI bug.

Describe the bug

On phpMyAdmin 6.0, if the TablePrimaryKeyOrder variable is set to ASC or DESC in config.inc.php, tables cannot be browsed (HTML is incomplete/screwed up)

To Reproduce

Steps to reproduce the behavior:

  1. Add to config.inc.php: $cfg['TablePrimaryKeyOrder'] = 'DESC';
  2. Try to browse any table
  3. Not working

Expected behavior

Table browsing should work.

Server configuration

  • Operating system: Linux
    
  • Web server: Apache
    
  • Database version: MariaDB 10.10.3
    
  • PHP version: 8.1.10
    
  • phpMyAdmin version: **6.0.0-dev**
    

Client configuration

  • Browser: any
  • Operating system: any

Describe the bug

When I tried to resize navigation width, it failed.
I took a look and I found the following.

  1. When the width is resized, SetConfigController is called.
  2. In __invoke method, PhpMyAdmin\Config::setUserValue function is called.
  3. The third argument ($new_cfg_value) must be of type string, int given.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://demo.phpmyadmin.net/master-config/public/
  2. Resize navigation
  3. See error

Expected behavior

Resize Navigation width without errors.

Screenshots

Server configuration

  • Operating system:
  • Web server: nginx/1.14.2
  • Database version:
  • PHP version: 8.2.4
  • phpMyAdmin version: 6.0.0-dev

Client configuration

  • Browser: Google Chrome
  • Operating system:

Describe the bug

Input fields in pmahomme theme are not properly styled, because of a line in theme.css that bypasses class "form-control", that is applied to all input fields.

To Reproduce

Steps to reproduce the behavior:

  1. Go to any page containing input fields
  2. See that input fields do not have rounded borders and proper padding

Expected behavior

Input fields should be properly and consistently styled.

Screenshots

Before:

before

After:

after

Server configuration

  • Operating system: any
  • Web server: any
  • Database version: any
  • PHP version: any
  • phpMyAdmin version: v5.2, and v6.0

Client configuration

  • Browser: any
  • Operating system: any

Additional context

The offending line is:

input[type=text], input[type=password], input[type=number], input[type=date] {
  border-radius: 2px;
  background: white;
  border: 1px solid #aaa;
  color: #555;
  padding: 4px;
}

It should be:


**input:not(.form-control)[type=text], input:not(.form-control)[type=password], input:not(.form-control)[type=number], input:not(.form-control)[type=date] {**
  border-radius: 2px;
  background: white;
  border: 1px solid #aaa;
  color: #555;
  padding: 4px;
}

Describe the bug

Our phpmyadmin was (seemingly) randomly throwing at us errors code 500 so I took a look at the logs and found this:

PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 2097152 bytes) in [...]/phpmyadmin/db_sql_autocomplete.php on line 41
PHP message: PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 131072 bytes) in Unknown on line 0" while reading response header from upstream, client: [...], server: [...], request: "POST /utils-sqladmin/db_sql_autocomplete.php HTTP/1.1"

To Reproduce

Steps to reproduce the behavior:

  1. Have a very large number of tables on a database (ours is ~3000)
  2. Open the SQL panel on that database
  3. Start writing/adding a WHERE clause
  4. See error 500 popup

Server configuration

  • Operating system: Gentoo Linux
  • Web server: Nginx
  • Database version: 10.2.30-MariaDB
  • PHP version: 7.1.33
  • phpMyAdmin version: 5.0.1

Ubuntu 18.04 after upgrade to pma 5.2 -- With Blowfish key included Warning Persists

The configuration file needs a valid key for cookie encryption...

I have included $cfg['blowfish_secret'] = '!BTuLmDU.$iNe)DOZj>n?Rldg.(eqG"n';

Does anyone have the blowfish encryption working on ubuntu with pma 5.2?
This is probably way too much information and I have spent way too much time trying to remove the warning.

Briefly I upgraded my server to php8.1
pma started giving deprecation errors
upgraded pma to 5.2
added the blowfish key to the config file
warning message persists.

/etc/phpmyadmin/config.inc.php
$cfg['blowfish_secret'] = '!BTuLmDU.$iNe)DOZj>n?Rldg.(eqG"n';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['DefaultCharset'] = 'utf8';
$cfg['DefaultConnectionCollation'] = 'utf8_general_ci';
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

I have changed ownership of everything to www-data (and back again)
initially there was a tmp folder warning. I removed that by adding /usr/share/phpmyadmin/tmp and giving ownership to www-date. The warning went away with out adding anything to the config.inc.php

To Reproduce

upgrade from php 7.4 to php 8.1

upgrade phpmyadmin 4:4.6.6-5ubuntu0.5 installed with apt to pma 5.2
started showing pages of deprecated errors with php 8.1

upgraded to pma 5.2 by downloading and extracting the contents to
/usr/share/phpmyadmin
after backing up the old contents to a different dir and clearing the contents.
copied /usr/share/phpmyadmin/config.sample.inc.php to /etc/phpmyadmin/config.inc.php
edited accordingly
included $cfg['blowfish_secret'] = '!BTuLmDU.$iNe)DOZj>n?Rldg.(eqG"n';

Expected behavior

Remove the warning encrypt the cookie.

Screenshots

warning on pma

Server configuration

Server: Localhost via UNIX socket
Server type: MySQL
Server connection: SSL is not being used Documentation
Server version: 5.7.41-0ubuntu0.18.04.1-log - (Ubuntu)
Protocol version: 10
User: x
Server charset: UTF-8 Unicode (utf8)
Web server
Apache
Database client version: libmysql - mysqlnd 8.1.17
PHP extension: mysqli Documentation curl Documentation mbstring Documentation sodium Documentation
PHP version: 8.1.17
phpMyAdmin 5.2.1 (up to date)

Client configuration

  • Browser: Chrome, Edge (latest) and a bare chrome with no extensions.
  • Operating system: Windows 10

Additional context

The pma package installer on ubuntu installs

/etc/phpmyadmin/apache.conf

which is a an apache vhost file symlinked in /etc/apache2/confs-enabled/apache.conf

the pertinent contents:

Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir
/usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-
gettext/:/usr/share/php/php-php-
gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/:/usr/share/php/PhpMyAdmin/:/usr/share/php/Symfony/:/usr/share/php/Twig/:/usr/share/php/Twig-Extensions/:/usr/share/php/ReCaptcha/:/usr/share/php/Psr/Container/:/usr/share/php/Psr/Cache/:/usr/share/php/Psr/Log/:/usr/share/php/Psr/SimpleCache/

Finally on my test server ubuntu 20.04 php8.1.17 I rolled back to the ubuntu pma package and silenced the warnings with $cfg['SendErrorReports'] = 'never';

Which I am about to do on my production server.

Describe the bug

Right now 250 empty tables are exported in ~43 seconds. This is because when exporting, the table schema is fetched each time for each table, instead for the entire database. Even if the user chooses to export only some tables, the fastest way is to fetch the schema for the entire database. If this is done, for 250 tables will only take ~24 seconds.

Ref: #16005

To Reproduce

Steps to reproduce the behavior:

  1. Create a database with 250 tables
  2. Export the entire database

Expected behavior

Exporting needs improvement.

Screenshots

Untitled

Server configuration

  • phpMyAdmin version: 5.2.2-dev, 6.0.0-dev

Additional context

$this->dbi->getTablesFull($db, $table);

Describe the bug

PhpMyAdmin\Dbal\InvalidDatabaseName: The database name must be a non-empty string.

To Reproduce

Steps to reproduce the behavior:

  1. Create a bookmark with this query
    SHOW BINLOG EVENTS LIMIT 0, 25;
  2. Go to https://demo.phpmyadmin.net/master/public/index.php?route=/server/sql&server=1
  3. Select the bookmark
  4. Click on Go
  5. See error

Expected behavior

The query should execute and show results like it does on 5.2.2-dev.

Screenshots

Server configuration

  • phpMyAdmin version: 6.0.0-dev

Describe the bug

I tried to open phpmyadmin and got a 500 server error:

image

When trying to find out what happened to the server I see this error in the log:

sudo tail -n 2 /var/log/apache2/error.log
[Fri May 13 14:44:11.929538 2022] [php7:error] [pid 1334] [client 192.168.160.1:30449] PHP Parse error: syntax error, unexpected 'static' (T_STATIC) in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 272
[Fri May 13 14:44:13.206921 2022] [php7:error] [pid 1331] [client 192.168.160.1:30459] PHP Parse error: syntax error, unexpected 'static' (T_STATIC) in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 272

To Reproduce

having installed Apache, MySQL and php 7.4

I have installed phpmyadmin using the following command:

sudo add-apt-repository ppa:phpmyadmin/ppa
sudo apt-get update
sudo apt -y install phpmyadmin

when the installation is done it has added a new version of php, to be more specific system add version 8.1
at the end of the installation and past the configuration dialog:

image

imager

I'm going to try the phpmyadmin portal. and get the error/bug described above.

Expected behavior

that the phpmyadmin open normally without server problem error 500 related to dependencies.
How can we solve the problem of the package that is installed with apt?

Server configuration

  • Operating system: Ubuntu 22.04 Server
  • Web server: Apache
  • Database version: MySQL
  • PHP version: 7.4/8.1
  • phpMyAdmin version:

apt show phpmyadmin
Package: phpmyadmin
Version: 4:5.1.1+dfsg1-5ubuntu1
Priority: optional
Section: universe/web
Origin: Ubuntu
Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
Original-Maintainer: phpMyAdmin Packaging Team team+phpmyadmin@tracker.debian.org
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 36.5 MB
Depends: dbconfig-mysql | dbconfig-no-thanks | dbconfig-common (<< 2.0.0), libjs-bootstrap4, libjs-codemirror, libjs-jquery, libjs-jquery-mousewheel, libjs-jquery-timepicker, libjs-jquery-ui, php-cli, sensible-utils, ucf, debconf (>= 0.5) | debconf-2.0, php-common, php-json, php-mysql, php-xml, php-google-recaptcha (>= 1.1), php-google-recaptcha (<< 2~~), php-nikic-fast-route (>= 1.3), php-nikic-fast-route (<< 2~~), php-phpmyadmin-motranslator (>= 5.0), php-phpmyadmin-motranslator (<< 6~~), php-phpmyadmin-shapefile (>= 2.0), php-phpmyadmin-shapefile (<< 3~~), php-phpmyadmin-sql-parser (>= 5.0), php-phpmyadmin-sql-parser (<< 6~~), php-twig-i18n-extension (>= 3.0), php-twig-i18n-extension (<< 4~~), php-phpseclib (>= 2.0), php-phpseclib (<< 3~~), php-symfony-config (>= 4.4.9), php-symfony-config (<< 6~~), php-symfony-dependency-injection (>= 4.4.9), php-symfony-dependency-injection (<< 6~~), php-symfony-expression-language (>= 4.4.9), php-symfony-expression-language (<< 6~~), php-mbstring, php-twig (>= 2.9), php-twig (<< 4~~), php-mariadb-mysql-kbs (>= 1.2), php-mariadb-mysql-kbs (<< 2~~), libjs-sphinxdoc (>= 4.3)
Recommends: apache2 | lighttpd | httpd, php-bz2, php-curl, php-gd, php-tcpdf, php-zip
Suggests: default-mysql-server | virtual-mysql-server, php-recode, www-browser, php-opcache, php-gd2, php-pragmarx-google2fa-qrcode, php-samyoul-u2f-php-server
Homepage: https://www.phpmyadmin.net/
Download-Size: 4,937 kB
APT-Manual-Installed: yes
APT-Sources: http://pa.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
Description: MySQL web administration tool

Client configuration

  • Browser: Google Chrome lastes version
  • Operating system: Windows 11 Pro

Additional context

How can we solve the problem of the package that is installed with apt?

Describe the bug

when I truncated a table (comments) it gave me this error only on this table,
NOTE: other tables work fine when I truncate them

Warning in .\libraries\classes\Display\Results.php#4403
Trying to access array offset on value of type null

Backtrace

Results.php#4152: PhpMyAdmin\Display\Results->getSortedColumnMessage(
,
string '`comment`',
)
Sql.php#1368: PhpMyAdmin\Display\Results->getTable(
,
array,
array,
boolean true,
)
Sql.php#1169: PhpMyAdmin\Sql->getHtmlForSqlQueryResultsTable(
,
string './themes/pmahomme/img/',
array,
boolean false,
integer 0,
integer 0,
boolean true,
,
array,
boolean true,
)
Sql.php#1842: PhpMyAdmin\Sql->getQueryResponseForNoResultsReturned(
array,
string 'fanarhair',
string 'comments',
NULL,
integer 0,
,
NULL,
string './themes/pmahomme/img/',
NULL,
,
string 'SELECT * FROM `comments` ORDER BY `comment` ASC ',
NULL,
)
Sql.php#1707: PhpMyAdmin\Sql->executeQueryAndGetQueryResponse(
array,
boolean true,
string 'fanarhair',
string 'comments',
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
string 'SELECT * FROM `comments` ORDER BY `comment` ASC ',
NULL,
)
SqlController.php#219: PhpMyAdmin\Sql->executeQueryAndSendQueryResponse(
array,
boolean true,
string 'fanarhair',
string 'comments',
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
string 'SELECT * FROM `comments`',
NULL,
)
Routing.php#191: PhpMyAdmin\Controllers\SqlController->index(array)
index.php#18: PhpMyAdmin\Routing::callControllerForRoute(
string '/sql',
,
,
)

Screenshots

screencapture-localhost-phpmyadmin-index-php-2022-06-07-00_09_23

Server configuration

  • Operating system: windows 10
  • Web server: XAMMP
  • Database version: ibmysql - mysqlnd 8.1.4
  • PHP version :8.1.4
  • phpMyAdmin version: 5.1.3

Describe the bug

Right now if you browse a database with 250 tables/page, the average page load is 3.5-4 seconds from which 2.4 seconds is taken by getTrackingIcon and 1.6 seconds is taken by sql-parser.

To Reproduce

Steps to reproduce the behavior:

  1. Create a database with 500-1000 tables.
  2. Browse database
  3. See page load

Expected behavior

Page load needs improvement.

Screenshots

Using xhprof:

1

2

Server configuration

  • phpMyAdmin version: 5.2.2-dev, 6.0.0-dev

Describe the bug

I cant add privileges to a user I get 1064

GRANT ALL PRIVILEGES ON  *.* TO 'magento'@'localhost' REQUIRE NONE WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;

MySQL Server version: 8.0.32

If I run a query through the SQL tab that takes longer than 0.5s to run, I get no output, and no errors, all that happens is that the query box is hidden. Nothing in my JS console, or server error logs /var/log/httpd/*.log or /var/log/php-fpm/*.log

Looks like it runs the query as the time taken to spin and hide the query box appears consistent with the time to run the query. I should note that longer queries seem to run without issue in the relevant PHP application, and in the MariaDB command line on the same box

Steps to reproduce the behavior:

  • Login and go to SQL tab
  • Enter SELECT SLEEP(0.5) and hit Go - No Output
  • Enter SELECT SLEEP(0.4) and hit Go - Output as expected

SELECT SLEEP(0.5) results
image

SELECT SLEEP(0.4) results
image

Versions
image

Apache: 2.4.54 using PHP-FPM
OS Server: Amazon Linux 2 (Arm 64)
OS Client: macOS Monterey 12.6.3
Browser: Chrome Version 110.0.5481.177 (Official Build) (x86_64)

Steps taken to install phpMyAdmin on server:

cd /usr/share
sudo wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz
sudo mkdir phpMyAdmin
sudo tar -xvzf phpMyAdmin-latest-all-languages.tar.gz -C phpMyAdmin --strip-components 1

cd phpMyAdmin

sudo mkdir tmp
sudo chown ec2-user:apache tmp
chmod 775 tmp/

sudo rm -rf setup/
sudo cp config.sample.inc.php config.inc.php

sudo nano config.inc.php 
sudo nano /etc/httpd/conf.d/phpMyAdmin.conf

Describe the bug

on update CURRENT_TIMESTAMP doesn't show as default on attributes select.

To Reproduce

Steps to reproduce the behavior:

  1. Have a column with on update CURRENT_TIMESTAMP
  2. Edit that column
  3. See the attribute not selected as default.

Expected behavior

on update CURRENT_TIMESTAMP should be selected as default, if this attribute is present for that column.

Screenshots

Server configuration

  • phpMyAdmin version: 5.2.2-dev, 6.0.0-dev

Describe the bug

Some VIEW type tables do not open.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://demo.phpmyadmin.net/master-config/public/index.php?route=/database/structure&db=sakila
  2. Click on actor_info table
  3. See error

Expected behavior

Table should open.

Screenshots

Server configuration

  • phpMyAdmin version: 6.0.0-dev

Describe the bug

TypeError: PhpMyAdmin\Index::hasColumn(): Argument #1 ($column) must be of type string, int given, called in /home/demo/.pma-demo/master/libraries/classes/DatabaseInterface.php on line 915

Column name doesn't allow single numbers.

To Reproduce

Steps to reproduce the behavior:

  1. Create a table
  2. Change column to 0, 1 or 3
  3. See error

Expected behavior

Columns should allow single numbers.

Screenshots

Server configuration

  • phpMyAdmin version: 6.0.0-dev

Describe the bug

TypeError: PhpMyAdmin\Linter::findLineNumberAndColumn(): Argument #2 ($pos) must be of type int, null given, called in /home/demo/.pma-demo/master/libraries/classes/Linter.php on line 148

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://demo.phpmyadmin.net/master/public/index.php?route=/server/sql
  2. Paste SELECT * FROM - with space
  3. See error

Expected behavior

No error should happen.

Screenshots

Server configuration

  • phpMyAdmin version: 6.0.0-dev

Describe the bug

phpMyAdmin configuration storage database is setup, a pma__tracking table exists with no tables being tracked at all, yet there's an issue.

  1. If a pma__tracking table exists, there's no way to disable tracking from config.inc.php. I've tried setting $cfg['Servers'][$i]['tracking'] to false, empty string, wrong table name and it doesn't work. (https://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_tracking)

At least this is how I understand the setting and I hope I'm not wrong. This is why the Import is slow, because it doesn't respect the default value (in the config).

Expected behavior

  1. Even if pma__tracking table exists, it should respect $cfg['Servers'][$i]['tracking'] setting.
  2. Even if pma__tracking table exists and there's no $cfg['Servers'][$i]['tracking'] setting (empty by default), queries (in this case when using the Import feature) shouldn't be tracked.
  3. Even if $cfg['Servers'][$i]['pmadb'] is set to another database name, this setting is ignored.

Server configuration

  • phpMyAdmin version: 5.2.2-dev, 6.0.0-dev

Describe the bug

TypeError: PhpMyAdmin\DatabaseInterface::quoteString(): Argument #1 ($str) must be of type string, bool given, called in /home/demo/.pma-demo/master-config/libraries/classes/Table.php on line 627 when moving a column.

UPDATE 1: TypeError: PhpMyAdmin\Table::generateAlter(): Argument #11 ($comment) must be of type string, bool given, called in /home/demo/.pma-demo/master-config/libraries/classes/Controllers/Table/Structure/MoveColumnsController.php on line 111

UPDATE 2: Internal error in .\libraries\classes\Table.php#786 TypeError: PhpMyAdmin\Table::generateAlter(): Argument #9 ($defaultValue) must be of type string, null given, called in \phpmyadmin\libraries\classes\Controllers\Table\Structure\MoveColumnsController.php on line 111

To Reproduce

Steps to reproduce the behavior:

  1. Go to any table structure
  2. Move a column
  3. See error

Expected behavior

No error should be given.

Screenshots

Server configuration

  • phpMyAdmin version: 6.0.0-dev