Phpmyadmin: 4.8.0 does not work behind SSL proxy

Created on 21 Apr 2018  ·  54Comments  ·  Source: phpmyadmin/phpmyadmin

4.7.9 works fine but 4.8.0 has connection problems behind a SSL proxy

Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin.

In the log:

PHP Fatal error:  Uncaught Error: Call to a member function exists() on null in
 /var/www/phpMyAdmin/libraries/classes/DatabaseInterface.php:1544
Stack trace:
#0 /var/www/phpMyAdmin/libraries/classes/DatabaseInterface.php(2477): PhpMyAdmin\DatabaseInterface->postConnectControl()
#1 /var/www/phpMyAdmin/libraries/common.inc.php(358): PhpMyAdmin\DatabaseInterface->connect(257)
#2 /var/www/phpMyAdmin/index.php(26): require_once('/var/www/...')
#3 {main}
  thrown in /var/www/phpMyAdmin/libraries/classes/DatabaseInterface.php on line 1544

constellation: nginx/1.12 web server on Port 80 behind nginx/1.12 proxy on port 443 with SSL

proxy configuration:

proxy_set_header Host                   $host;
proxy_set_header X-Real-IP              $remote_addr;
proxy_set_header X-Forwarded-For        $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto      $scheme;
proxy_set_header X-Forwarded-Host       $host;
add_header       Front-End-Https        on;
proxy_redirect off;

Also reported here:
https://stackoverflow.com/questions/49746590/phpmyadmin-4-8-0-apache2-behind-nginx-proxy-session-cookie-error-on-login

bug

Most helpful comment

Simple outdated/wrong hostname resp. IP number in mysql database, table db, column host for the server phpmyadmin runs. I've migrated phpmyadmin a while ago and forgotten to change the host IP in mysql.db table.
E.g. right IP for phpmyadmins home is 192.168.0.1. Change it to any other IP, flush the privileges and I have the PHP Fatal Error again. Change it back to the webserver IP phpmyadmin runs, flush privileges and phpMyAdmin works.
Before 4.8.0 improperly data in mysql.db.host has no bad consequences.

All 54 comments

Trying to connect directly to the backend server without https. Same behavior and error massages... as reported here: #14184

Tested Browsers on Mac OS: Safari, Firefox

The problem is that the cookies are restricted by a defined path :

Set-Cookie: phpMyAdmin=cjnp37dge73th23009kvnm2k63; path=/phpmyadmin/; HttpOnly
Set-Cookie: pma_lang=en; expires=Fri, 25-May-2018 20:30:44 GMT; Max-Age=2592000; path=/phpmyadmin/; HttpOnly

If you add a cookie path rewriter in one of the 2 location blocks : proxy_cookie_path /phpmyadmin/ /;
The login succeeds.

See on nginx docs : here

[EDIT] Issue fixed on Stackoverflow, solution accepted.

My phpMyAdmin is working on a subdomain https://phpmyadmin.domain.tld - not on a directory. The cookies in the browser:

pma_lang de phpmyadmin.domain.tld / 21.5.2018, 09:12:00 10 B ✓ ✓
phpMyAdmin 705aec69c73f486f94c52ca782607309 phpmyadmin.domain.tld / Sitzung 42 B ✓ ✓

This cookie resp. session on the server:

 PMA_token |s:16:"XXXX'$?";browser_access_time|a:1:{s:7:"default";i:1524743196;}relation|a:1:{i:1;a:22:{s:11:"PMA_VERSION";s:5:"4.8.0";s:7:"relwork";b:0;s:11:"displaywork";b:0;s:12:"bookmarkwork";b:0;s:7:"pdfwork";b:0;s:8:"commwork";b:0;s:8:"mimework";b:0;s:11:"historywork";b:0;s:10:"recentwork";b:0;s:12:"favoritework";b:0;s:11:"uiprefswork";b:0;s:12:"trackingwork";b:0;s:14:"userconfigwork";b:0;s:9:"menuswork";b:0;s:7:"navwork";b:0;s:17:"savedsearcheswork";b:0;s:18:"centralcolumnswork";b:0;s:20:"designersettingswork";b:0;s:19:"exporttemplateswork";b:0;s:8:"allworks";b:0;s:4:"user";N;s:2:"db";N;}}

Is it possible for you to send your nginx configuration ?
According to the config on Stackoverflow you proxy the traffic twice.
With this configuration I was able to reproduce your issue.

No I don't think I proxy the service twice. But as I said before it didn't work without a proxy and with and without https:// on a locale internal Domain
Working version 4.79 sets more cookies that I can't see in the browser with 4.80:

pmaCookieVer
pmapma_collation_connection
pmaUser-1   
pmaUser-4

PHP Error with 4.80:
```
[26-Apr-2018 12:19:11 UTC] PHP Fatal error: Uncaught Error: Call to a member function exists() on null in ... libraries/classes/DatabaseInterface.php:1544
Stack trace:

0 ... libraries/classes/DatabaseInterface.php(2477): PhpMyAdmin\DatabaseInterface->postConnectControl()

1 ... libraries/common.inc.php(358): PhpMyAdmin\DatabaseInterface->connect(257)

2 ... index.php(26): require_once('/var/www/...')

3 {main}

thrown in ... libraries/classes/DatabaseInterface.php on line 1544

Browser are newest on Mac OS, Firefox 59.02 and Safari 11.1
OS is a FreeBSD 11.1 with Lighttpd as the local webserver behind the nginx proxy
PHP is ver 7.1 working with php-fpm on sockets

To make it easier I can test now without the nginx proxy on a local network over a VPN, with or without https only on the lighty - that doesn't work with 4.80 but with 4.79

libraries/classes/DatabaseInterface.php lines 1543-1545

if ($GLOBALS['dblist']->databases->exists('phpmyadmin')) {
    $this->relation->fixPmaTables('phpmyadmin', false);
}

Maybe this has nothing to do with the login.

I've reinstalled the newest FreeBSD pkg 4.8.0.1 and a version with your upgrade script - same error

php-fpm --version
PHP 7.1.16 (fpm-fcgi) (built: Mar 31 2018 16:23:23) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.16, Copyright (c) 1999-2018, by Zend Technologies

lighttpd -v
lighttpd/1.4.49 (ssl) - a light and fast webserver

Yes I have a config.inc.php and the phpmyadmin database exists

Error is also only on lighty without the proxy

The mariaDB and mysql databases are on other servers and I'm connecting via tcp

  • [x] PhpMyAdmin is not corrupted
  • [x] php is up to date
  • [x] lighttpd is up to date
  • [x] multiple browsers tested
  • [x] server config
  • [x] cookie restriction
  • [x] PhpMyAdmin config

Can you send your config.inc.php ?
What version of mariadb are you using ?
Can you send the response headers of a login request ?

Version 4.79 works fine with all constellations with all browsers with and without proxy or https with the exact the same configuration as 4.80.

<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 4.6.0 setup script
 * Date: Sun, 17 Apr 2016 11:07:54 +0000
 */

/* Servers configuration */
$i = 0;


$i++;
$cfg['Servers'][$i]['host'] = 'db.domain.locale';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
$cfg['Servers'][$i]['controlpass'] = 'password';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['verbose'] = 'DB.0'; 
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['verbose_check'] = true;


$i++;
$cfg['Servers'][$i]['host'] = '192.168.0.1';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
$cfg['Servers'][$i]['controlpass'] = 'password';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['verbose'] = 'DB.1'; #
$cfg['Servers'][$i]['verbose_check'] = true;


$i++;
$cfg['Servers'][$i]['host'] = '192.168.0.2';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
$cfg['Servers'][$i]['controlpass'] = 'password';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['verbose'] = 'DB.2'; 
$cfg['Servers'][$i]['verbose_check'] = true;


$i++;
$cfg['Servers'][$i]['host'] = '192.168.0.3';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
$cfg['Servers'][$i]['controlpass'] = 'password';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['verbose'] = 'DB.3'; 
$cfg['Servers'][$i]['pmadb'] = 'PMA';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['verbose_check'] = true;
$cfg['Servers'][$i]['AllowDeny'] = array (
  'order' => '',
  'rules' =>
  array (
  ),
);


$i++;
$cfg['Servers'][$i]['host'] = '192.168.0.4';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
$cfg['Servers'][$i]['controlpass'] = 'password';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['verbose'] = 'DB.4'; 
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['verbose_check'] = true;

/* End of servers configuration */

$cfg['PmaAbsoluteUri'] = '';
$cfg['PmaAbsoluteUri_DisableWarning'] = true;
$cfg['PmaNoRelation_DisableWarning'] = true;
$cfg['blowfish_secret'] = '1234567';
$cfg['DefaultLang'] = 'de';
$cfg['ServerDefault'] = 1;
$cfg['ServerDefault'] = 1;
$cfg['Server'] = '';
$cfg['SuhosinDisableWarning'] = true;
$cfg['ShowSQL'] = true;
$cfg['Confirm'] = true;
$cfg['LoginCookieValidity'] = 1200;
$cfg['IgnoreMultiSubmitErrors'] = false;
$cfg['VerboseMultiSubmit'] = true;

@ntinti config works fine.
Can you send the response headers of a login request ?

Without https, without proxy on locale domain:

Cache-Control   
no-store, no-cache, must-reval…ck=0, post-check=0, max-age=0
Content-Encoding    
gzip
Content-Length  
3602
Content-Security-Policy 
default-src 'self' ;script-src…eetmap.org;object-src 'none';
Content-Type    
text/html; charset=utf-8
Date    
Thu, 26 Apr 2018 15:25:41 GMT
Expires 
Thu, 26 Apr 2018 15:25:41 +0000
Last-Modified   
Thu, 26 Apr 2018 15:25:41 +0000
Pragma  
no-cache
Referrer-Policy 
no-referrer
Server  
Lighty
Set-Cookie  
pma_lang=de; expires=Sat, 26-M…; path=/; HttpOnly
Set-Cookie  
phpMyAdmin=feaa26b6e09435e5805…; path=/; HttpOnly
Vary    
Accept-Encoding
X-Content-Security-Policy   
default-src 'self' ;options in…eetmap.org;object-src 'none';
X-Content-Type-Options  
nosniff
X-Frame-Options 
DENY
X-ob_mode   
1
X-Permitted-Cross-Domain-Policies   
none
X-Powered-By    
PHP/7.1.16
X-Robots-Tag    
noindex, nofollow
X-WebKit-CSP    
default-src 'self' ;script-src…eetmap.org;object-src 'none';
X-XSS-Protection    
1; mode=block

Accept  
text/html,application/xhtml+xm…plication/xml;q=0.9,*/*;q=0.8
Accept-Encoding 
gzip, deflate
Accept-Language 
de,en-US;q=0.7,en;q=0.3
Connection  
keep-alive
Content-Length  
151
Content-Type    
application/x-www-form-urlencoded
Cookie  
pma_console_height=92; pma_con…%2C%22darkTheme%22%3Afalse%7D
DNT 
1
Host    
db.domain.locale
Upgrade-Insecure-Requests   
1
User-Agent  
Mozilla/5.0 (Macintosh; Intel …) Gecko/20100101 Firefox/59.0

WITHOUT PROXY

Without HTTPS I only become the first login page and it jumps back to it with message in the browser:
"Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin."

With HTTPS, I got the PHP Error, and a blank page after the login with Error 500 on the Webserver

### HTTP: ###

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: de,en-US;q=0.7,en;q=0.3
Connection: keep-alive
Content-Length: 149
Content-Type: application/x-www-form-urlencoded
Cookie: pma_console_height=92; pma_console_mode=collapse; pma_console_config=%7B%22alwaysExpand%22%3Afalse%2C%22startHistory%22%3Afalse%2C%22currentQuery%22%3Atrue%2C%22enterExecutes%22%3Afalse%2C%22darkTheme%22%3Afalse%7D
DNT: 1
Host: db.domain.locale
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:59.0) Gecko/20100101 Firefox/59.0

HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate,  pre-check=0, post-check=0, max-age=0
Content-Encoding: gzip
Content-Length: 3595
Content-Security-Policy: default-src 'self' ;script-src 'self' 'unsafe-inline' 'unsafe-eval' ;style-src 'self' 'unsafe-inline' ;img-src 'self' data:  *.tile.openstreetmap.org;object-src 'none';
Content-Type: text/html; charset=utf-8
Date: Thu, 26 Apr 2018 17:10:38 GMT
Expires: Thu, 26 Apr 2018 17:10:38 +0000
Last-Modified: Thu, 26 Apr 2018 17:10:38 +0000
Pragma: no-cache
Referrer-Policy: no-referrer
Server: Lighty
Set-Cookie: pma_lang=de; expires=Sat, 26-May-2018 17:10:38 GMT; Max-Age=2592000; path=/; HttpOnly
Set-Cookie: phpMyAdmin=87e52c8a45c8acff0788902b9e3bb69e; path=/; HttpOnly
Vary: Accept-Encoding
X-Content-Security-Policy: default-src 'self' ;options inline-script eval-script;referrer no-referrer;img-src 'self' data:  *.tile.openstreetmap.org;object-src 'none';
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-ob_mode: 1
X-Permitted-Cross-Domain-Policies: none
X-Powered-By: PHP/7.1.16
X-Robots-Tag: noindex, nofollow
X-WebKit-CSP: default-src 'self' ;script-src 'self'  'unsafe-inline' 'unsafe-eval';referrer no-referrer;style-src 'self' 'unsafe-inline' ;img-src 'self' data:  *.tile.openstreetmap.org;object-src 'none';
X-XSS-Protection: 1; mode=block



### HTTPS: ### 


*** BEFORE LOGIN: ***

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: de,en-US;q=0.7,en;q=0.3
Cache-Control: max-age=0
Connection: keep-alive
Content-Length: 141
Content-Type: application/x-www-form-urlencoded
Cookie: pmaCookieVer=5; pma_lang=de; pma_collation_connection=utf8mb4_unicode_ci; pmaUser-4=%7B%22iv%22%3A%22YAkM35lL4JTR6NO5rxhhQw%3D%3D%22%2C%22mac%22%3A%22429563609ab359e6ef49da4e0a12c45d371d55f3%22%2C%22payload%22%3A%2223s1yVJ6LmlWbSR0FF0aCA%3D%3D%22%7D; pma_console_height=92; pma_console_mode=collapse; pma_console_config=%7B%22alwaysExpand%22%3Afalse%2C%22startHistory%22%3Afalse%2C%22currentQuery%22%3Atrue%2C%22enterExecutes%22%3Afalse%2C%22darkTheme%22%3Afalse%7D; pmaAuth-4=%7B%22iv%22%3A%22wjuahVPmtW00yfAR7D2UbQ%3D%3D%22%2C%22mac%22%3A%229385bcf6f358b4afbeca37afe892ecdcf98b35f8%22%2C%22payload%22%3A%22WLaYLW4%5C%2Fc6ZCqMuWJIY7VEvllvXintT4w98UrSAFObg%3D%22%7D; phpMyAdmin=00fe89a1b76ccd904192848867396da7; pmaCookieVer=5; pma_lang=de; pma_collation_connection=utf8mb4_unicode_ci; phpMyAdmin=721c2e06bb4064f0a29874b35d9a55ed
DNT: 1
Host: db.domain.locale
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:59.0) Gecko/20100101 Firefox/59.0


HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, must-revalidate,  pre-check=0, post-check=0, max-age=0
Content-Encoding: gzip
Content-Length: 3588
Content-Security-Policy: default-src 'self' ;script-src 'self' 'unsafe-inline' 'unsafe-eval' ;style-src 'self' 'unsafe-inline' ;img-src 'self' data:  *.tile.openstreetmap.org;object-src 'none';
Content-Type: text/html; charset=utf-8
Date: Thu, 26 Apr 2018 16:48:00 GMT
Expires: Thu, 26 Apr 2018 16:48:00 +0000
Last-Modified: Thu, 26 Apr 2018 16:48:00 +0000
Pragma: no-cache
Referrer-Policy: no-referrer
Server: Lighty
Set-Cookie: phpMyAdmin=d26f1cacb08f3c8787d191fb818459c5; path=/; secure; HttpOnly
Strict-Transport-Security: max-age=15768000;
Vary: Accept-Encoding
X-Content-Security-Policy: default-src 'self' ;options inline-script eval-script;referrer no-referrer;img-src 'self' data:  *.tile.openstreetmap.org;object-src 'none';
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-ob_mode: 1
X-Permitted-Cross-Domain-Policies: none
X-Powered-By: PHP/7.1.16
X-Robots-Tag: noindex, nofollow
X-WebKit-CSP: default-src 'self' ;script-src 'self'  'unsafe-inline' 'unsafe-eval';referrer no-referrer;style-src 'self' 'unsafe-inline' ;img-src 'self' data:  *.tile.openstreetmap.org;object-src 'none';
X-XSS-Protection: 1; mode=block


*** FORM DATA: ***

lang    de
pma_password    XXXXXX..
pma_username    dbadmin
server  1
set_session 0f11ee3b7037af6c1469ed3Y5cda580c
target  index.php
token   }ZCHJtV$f_FG%A[:



*** LOGIN: ***

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: de,en-US;q=0.7,en;q=0.3
Connection: keep-alive
Content-Length: 141
Content-Type: application/x-www-form-urlencoded
Cookie: pmaCookieVer=5; pma_lang=de; pma_collation_connection=utf8mb4_unicode_ci; pmaUser-4=%7B%22iv%22%3A%22YAkM35lL4JTR6NO5rxhhQw%3D%3D%22%2C%22mac%22%3A%22429563609ab359e6e7f9da4e0a12c45d371d55f3%22%2C%22payload%22%3A%2223s1yVJ6LmlWbSR0FF0aCA%3D%3D%22%7D; pma_console_height=92; pma_console_mode=collapse; pma_console_config=%7B%22alwaysExpand%22%3Afalse%2C%22startHistory%22%3Afalse%2C%22currentQuery%22%3Atrue%2C%22enterExecutes%22%3Afalse%2C%22darkTheme%22%3Afalse%7D; pmaAuth-4=%7B%22iv%22%3A%22wjuahVPmtW00yfAR7D2UbQ%3D%3D%22%2C%22mac%22%3A%229385bcf6f358b4afbeca37abc892ecdcf98b35f8%22%2C%22payload%22%3A%22WLaYLW4%5C%2Fc6ZCqMuWJXS7VEvllvXintT4w98UrSAFObg%3D%22%7D; phpMyAdmin=98de4d453638e6ffa56cb7542946f331; pmaCookieVer=5; pma_lang=de; pma_collation_connection=utf8mb4_unicode_ci; phpMyAdmin=721c2e06bb4064f0a29874b35d9a55ed
DNT: 1
Host: db.domain.locale
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:59.0) Gecko/20100101 Firefox/59.0

HTTP/1.1 500 Internal Server Error
Cache-Control: private, max-age=10800
Content-Length: 0
Content-type: text/html; charset=utf-8
Date: Thu, 26 Apr 2018 16:43:49 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Last-Modified: Mon, 09 Apr 2018 13:05:50 GMT
Server: Lighty
Set-Cookie: phpMyAdmin=00fe89a1b76ccd904198548867396da7; path=/; secure; HttpOnly
Strict-Transport-Security: max-age=15768000;
X-Powered-By: PHP/7.1.16



LIGHTY DEBUG

2018-04-26 18:58:34: (request.c.445) fd: 17 request-len: 1282 \nPOST /index.php HTTP/1.1\r\nHost: db.domain.locale\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:59.0) Gecko/20100101 Firefox/59.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: de,en-US;q=0.7,en;q=0.3\r\nAccept-Encoding: gzip, deflate, br\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 143\r\nCookie: pmaCookieVer=5; pma_lang=de; pma_collation_connection=utf8mb4_unicode_ci; pmaUser-4=%7B%22iv%22%3A%22YAkM35lL4JTR6NO5rxhhQw%3D%3D%22%2C%22mac%22%3A%22429563609ab359e6ef49da4e0a12c45d371d55f3%22%2C%22payload%22%3A%2223s1yVJ6LmlWbSR0FF0aCA%3D%3D%22%7D; pma_console_height=92; pma_console_mode=collapse; pma_console_config=%7B%22alwaysExpand%22%3Afalse%2C%22startHistory%22%3Afalse%2C%22currentQuery%22%3Atrue%2C%22enterExecutes%22%3Afalse%2C%22darkTheme%22%3Afalse%7D; pmaAuth-4=%7B%22iv%22%3A%22wjuahVPmtW00yfAR7D2UbQ%3D%3D%22%2C%22mac%22%3A%229385bcf6f358b4afbeca37abc892ecdcf98b35f8%22%2C%22payload%22%3A%22WLaYLW4%5C%2Fc6ZCqMuWJIY7VEvllvXintT4w98UrSAFObg%3D%22%7D; phpMyAdmin=21a96b94d4caa2f521a93125325c1658; pmaCookieVer=5; pma_lang=de; pma_collation_connection=utf8mb4_unicode_ci; phpMyAdmin=721c2e06bb4064f0a29874b35d9a55ed\r\nDNT: 1\r\nConnection: keep-alive\r\nUpgrade-Insecure-Requests: 1\r\n\r\n
2018-04-26 18:58:34: (response.c.388) -- splitting Request-URI
2018-04-26 18:58:34: (response.c.389) Request-URI     :  /index.php
2018-04-26 18:58:34: (response.c.390) URI-scheme      :  https
2018-04-26 18:58:34: (response.c.391) URI-authority   :  db.domain.locale
2018-04-26 18:58:34: (response.c.392) URI-path (raw)  :  /index.php
2018-04-26 18:58:34: (response.c.393) URI-path (clean):  /index.php
2018-04-26 18:58:34: (response.c.394) URI-query       :
2018-04-26 18:58:34: (mod_access.c.159) -- mod_access_uri_handler called
2018-04-26 18:58:34: (gw_backend.c.933) gw - found a host  0
2018-04-26 18:58:34: (response.c.532) -- before doc_root
2018-04-26 18:58:34: (response.c.533) Doc-Root     :  /var/www/db.domain.locale
2018-04-26 18:58:34: (response.c.534) Rel-Path     : /index.php
2018-04-26 18:58:34: (response.c.535) Path         :
2018-04-26 18:58:34: (response.c.587) -- after doc_root
2018-04-26 18:58:34: (response.c.588) Doc-Root     :  /var/www/db.domain.locale
2018-04-26 18:58:34: (response.c.589) Rel-Path     : /index.php
2018-04-26 18:58:34: (response.c.590) Path         :  /var/www/db.domain.locale/index.php
2018-04-26 18:58:34: (response.c.607) -- logical -> physical
2018-04-26 18:58:34: (response.c.608) Doc-Root     :  /var/www/db.domain.locale
2018-04-26 18:58:34: (response.c.609) Basedir      :  /var/www/db.domain.locale
2018-04-26 18:58:34: (response.c.610) Rel-Path     : /index.php
2018-04-26 18:58:34: (response.c.611) Path         :  /var/www/db.domain.locale/index.php
2018-04-26 18:58:34: (response.c.623) -- handling physical path
2018-04-26 18:58:34: (response.c.624) Path         :  /var/www/db.domain.locale/index.php
2018-04-26 18:58:34: (response.c.631) -- handling subrequest
2018-04-26 18:58:34: (response.c.632) Path         :  /var/www/db.domain.locale/index.php
2018-04-26 18:58:34: (response.c.633) URI          : /index.php
2018-04-26 18:58:34: (response.c.634) Pathinfo     :
2018-04-26 18:58:34: (mod_access.c.159) -- mod_access_uri_handler called
2018-04-26 18:58:34: (mod_compress.c.851) -- handling file as static file
2018-04-26 18:58:34: (gw_backend.c.933) gw - found a host  0
2018-04-26 18:58:34: (gw_backend.c.2406) handling it in mod_gw
2018-04-26 18:58:34: (gw_backend.c.234) got proc: pid: 0 socket: unix:/var/spool/httpd/sockets/db.domain.locale.sock load: 1
2018-04-26 18:58:34: (gw_backend.c.308) released proc: pid: 0 socket: unix:/var/spool/httpd/sockets/db.domain.locale.sock load: 0
2018-04-26 18:58:34: (response.c.122) Response-Header: \nHTTP/1.1 500 Internal Server Error\r\nX-Powered-By: PHP/7.1.16\r\nExpires: Thu, 19 Nov 1981 08:52:00 GMT\r\nCache-Control: private, max-age=10800\r\nLast-Modified: Mon, 09 Apr 2018 13:05:50 GMT\r\nSet-Cookie: phpMyAdmin=0b08714bf9ef8bef61ab129366dca3bb; path=/; secure; HttpOnly\r\nContent-type: text/html; charset=utf-8\r\nStrict-Transport-Security: max-age=15768000;\r\nContent-Length: 0\r\nDate: Thu, 26 Apr 2018 16:58:34 GMT\r\nServer: Lighty\r\n\r\n

@ntinti I am now able to reproduce this issue.

Can you confirm my scenarios ? ( Tested: chrome, firefox )

°1

  • Open a private navigation
  • Login using HTTP
  • Success !

°2

  • Open a private navigation
  • Login using HTTPS
  • Success !

°3

  1. Open a private navigation
  2. Login using HTTPS
  3. Success
  4. Login using HTTP
  5. Error !

@ibennetch @ntinti I think this explains this issue.
https://security.stackexchange.com/a/140944
Since the cookie phpMyAdmin is set in Secure mode, it can be rewritten in non secure mode but not sent back to the server in non secure mode (HTTP), creating this message.

If you confirm, I think we should use a different name to distinguish Secure and non Secure cookies.

I don't use the private navigation withe firefox or safari, but there are adblocker installed.
To exclude any firefox or safari module I test it on an iPad with Safari. Same behavior, 4.79 works, 4.80 not.

Use private navigation to test login please. Close private navigation between HTTPS/HTTP tests.

If it is the session/cookie handling - what are you changing between version 4.79 and 4.80 so that there can be circumstances on the webserver or with php that cookies are not set correctly ?

As explained in https://security.stackexchange.com/a/140944
Secure Cookies are not sent by HTTP.
So if you first create the cookies on HTTPS you wont be able to send them to phpMyAdmin on HTTP.
They will be rewritten at each login, not sent back to the server.

I am not 100% sure so I need you to confirm by testing in private mode.

What I've done with and without private modus:
delete all cookies in the browser, delete all sessions on the server, restart the web server, open only a https connection. PHP error persist. And only two cookies are created: phpMyAdmin and pma_lang. With 4.79 I can see cookies named pma_collation_connection, pma-Auth, pma-User, these are missing on 4.80

So login works with HTTP and HTTPS ?
Does HTTP and HTTPS end on 500 error now ?

Seems same as #14187

No, sorry does not help to set $cfg['ZeroConf'] = false;
Login with https comes directly to a white blank page with php and 500 error
Login with http does not work and the pages jumps back to login form. But I think that is the behavior the whole time

This issue is strange, it seems like a mix a multiple issues.
So you confirm that in private mode the HTTP connexion keeps sending the message : Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin.

I need to find a way to reproduce this issue (500 error part).

Can you use another database server ?
https://www.db4free.net/?language=de

The configuration is for various database versions (mariaDB and mysql) on various server.
What I can do today in the evening or tomorrow: Use another server for phpmyadmin, on this I have multiple webserver (nginx, lighttpd, apache) and php versions (5.6 7.0. 7.1. 7.2) for selection and see what happened if I play with that.

Good idea, this will help find the origin of this issue :)

Testet on another FreeBSD server with nginx and php56 as backend, without and with proxy as front. On Maria DB Database Server and on MySQL - both are connected via tcp. Browser is Mac OS Firefox and on Windows also.
Same error :-(
Fatal error: Call to a member function exists() on null in ... /phpmyadmin/libraries/classes/DatabaseInterface.php on line 1544
:-(
Next test I can do: still another server with local mariaDB database server on the same server instance and connection via sockets ...

@ntinti this is strange ...
Can you do a test with a server that does not have a database named phpmyadmin / empty server ?
This issue now seems to be related to the content of the SQL server.
Thank you for helping us to find ! :)

Yes - without the phpmyadmin database it works! 👍
My phpmyadmin databases maybe more then 5 years old. What should I do?

Please send the phpmyadmin database to help create a patch for this issue.
Some people will have this issue when they upgrade.

Occurrences of this error : https://github.com/phpmyadmin/phpmyadmin/issues/14184#issuecomment-383860379 and https://github.com/phpmyadmin/phpmyadmin/issues/13948#issuecomment-385245961

First Server, older MySQL

-- Adminer 4.6.2 MySQL dump

SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

DROP TABLE IF EXISTS `pma_bookmark`;
CREATE TABLE `pma_bookmark` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dbase` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `user` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `label` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `query` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Bookmarks';


DROP TABLE IF EXISTS `pma_column_info`;
CREATE TABLE `pma_column_info` (
  `id` int(5) unsigned NOT NULL AUTO_INCREMENT,
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `column_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `comment` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `mimetype` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `transformation` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `transformation_options` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column information for phpMyAdmin';


DROP TABLE IF EXISTS `pma_designer_coords`;
CREATE TABLE `pma_designer_coords` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `x` int(11) DEFAULT NULL,
  `y` int(11) DEFAULT NULL,
  `v` tinyint(4) DEFAULT NULL,
  `h` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table coordinates for Designer';


DROP TABLE IF EXISTS `pma_history`;
CREATE TABLE `pma_history` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `timevalue` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `sqlquery` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `username` (`username`,`db`,`table`,`timevalue`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='SQL history for phpMyAdmin';


DROP TABLE IF EXISTS `pma_pdf_pages`;
CREATE TABLE `pma_pdf_pages` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `page_nr` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `page_descr` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
  PRIMARY KEY (`page_nr`),
  KEY `db_name` (`db_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='PDF relation pages for phpMyAdmin';


DROP TABLE IF EXISTS `pma_relation`;
CREATE TABLE `pma_relation` (
  `master_db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `master_table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `master_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `foreign_db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `foreign_table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `foreign_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`master_db`,`master_table`,`master_field`),
  KEY `foreign_field` (`foreign_db`,`foreign_table`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Relation table';


DROP TABLE IF EXISTS `pma_table_coords`;
CREATE TABLE `pma_table_coords` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `pdf_page_number` int(11) NOT NULL DEFAULT '0',
  `x` float unsigned NOT NULL DEFAULT '0',
  `y` float unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table coordinates for phpMyAdmin PDF output';


DROP TABLE IF EXISTS `pma_table_info`;
CREATE TABLE `pma_table_info` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `display_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table information for phpMyAdmin';


DROP TABLE IF EXISTS `pma_tracking`;
CREATE TABLE `pma_tracking` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `version` int(10) unsigned NOT NULL,
  `date_created` datetime NOT NULL,
  `date_updated` datetime NOT NULL,
  `schema_snapshot` text COLLATE utf8_bin NOT NULL,
  `schema_sql` text COLLATE utf8_bin,
  `data_sql` text COLLATE utf8_bin,
  `tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') COLLATE utf8_bin DEFAULT NULL,
  `tracking_active` int(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`db_name`,`table_name`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=COMPACT;


-- 2018-04-30 20:34:18

Second Server, newer MariaDB

-- Adminer 4.6.2 MySQL dump

SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

DROP TABLE IF EXISTS `pma__bookmark`;
CREATE TABLE `pma__bookmark` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dbase` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `user` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `label` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `query` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Bookmarks';


DROP TABLE IF EXISTS `pma__central_columns`;
CREATE TABLE `pma__central_columns` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `col_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `col_type` varchar(64) COLLATE utf8_bin NOT NULL,
  `col_length` text COLLATE utf8_bin,
  `col_collation` varchar(64) COLLATE utf8_bin NOT NULL,
  `col_isNull` tinyint(1) NOT NULL,
  `col_extra` varchar(255) COLLATE utf8_bin DEFAULT '',
  `col_default` text COLLATE utf8_bin,
  PRIMARY KEY (`db_name`,`col_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Central list of columns';


DROP TABLE IF EXISTS `pma__column_info`;
CREATE TABLE `pma__column_info` (
  `id` int(5) unsigned NOT NULL AUTO_INCREMENT,
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `column_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `comment` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `mimetype` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `transformation` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `transformation_options` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `input_transformation` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `input_transformation_options` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column information for phpMyAdmin';


DROP TABLE IF EXISTS `pma__designer_settings`;
CREATE TABLE `pma__designer_settings` (
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `settings_data` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Settings related to Designer';


DROP TABLE IF EXISTS `pma__export_templates`;
CREATE TABLE `pma__export_templates` (
  `id` int(5) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `export_type` varchar(10) COLLATE utf8_bin NOT NULL,
  `template_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `template_data` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `u_user_type_template` (`username`,`export_type`,`template_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Saved export templates';


DROP TABLE IF EXISTS `pma__favorite`;
CREATE TABLE `pma__favorite` (
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `tables` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Favorite tables';


DROP TABLE IF EXISTS `pma__history`;
CREATE TABLE `pma__history` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `timevalue` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `sqlquery` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `username` (`username`,`db`,`table`,`timevalue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='SQL history for phpMyAdmin';


DROP TABLE IF EXISTS `pma__navigationhiding`;
CREATE TABLE `pma__navigationhiding` (
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `item_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `item_type` varchar(64) COLLATE utf8_bin NOT NULL,
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`username`,`item_name`,`item_type`,`db_name`,`table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Hidden items of navigation tree';


DROP TABLE IF EXISTS `pma__pdf_pages`;
CREATE TABLE `pma__pdf_pages` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `page_nr` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `page_descr` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
  PRIMARY KEY (`page_nr`),
  KEY `db_name` (`db_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='PDF relation pages for phpMyAdmin';


DROP TABLE IF EXISTS `pma__recent`;
CREATE TABLE `pma__recent` (
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `tables` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Recently accessed tables';


DROP TABLE IF EXISTS `pma__relation`;
CREATE TABLE `pma__relation` (
  `master_db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `master_table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `master_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `foreign_db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `foreign_table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `foreign_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`master_db`,`master_table`,`master_field`),
  KEY `foreign_field` (`foreign_db`,`foreign_table`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Relation table';


DROP TABLE IF EXISTS `pma__savedsearches`;
CREATE TABLE `pma__savedsearches` (
  `id` int(5) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `search_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `search_data` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `u_savedsearches_username_dbname` (`username`,`db_name`,`search_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Saved searches';


DROP TABLE IF EXISTS `pma__table_coords`;
CREATE TABLE `pma__table_coords` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `pdf_page_number` int(11) NOT NULL DEFAULT '0',
  `x` float unsigned NOT NULL DEFAULT '0',
  `y` float unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table coordinates for phpMyAdmin PDF output';


DROP TABLE IF EXISTS `pma__table_info`;
CREATE TABLE `pma__table_info` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  `display_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
  PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table information for phpMyAdmin';


DROP TABLE IF EXISTS `pma__table_uiprefs`;
CREATE TABLE `pma__table_uiprefs` (
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `prefs` text COLLATE utf8_bin NOT NULL,
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`username`,`db_name`,`table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Tables'' UI preferences';


DROP TABLE IF EXISTS `pma__tracking`;
CREATE TABLE `pma__tracking` (
  `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
  `version` int(10) unsigned NOT NULL,
  `date_created` datetime NOT NULL,
  `date_updated` datetime NOT NULL,
  `schema_snapshot` text COLLATE utf8_bin NOT NULL,
  `schema_sql` text COLLATE utf8_bin,
  `data_sql` longtext COLLATE utf8_bin,
  `tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') COLLATE utf8_bin DEFAULT NULL,
  `tracking_active` int(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`db_name`,`table_name`,`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database changes tracking for phpMyAdmin';


DROP TABLE IF EXISTS `pma__userconfig`;
CREATE TABLE `pma__userconfig` (
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `timevalue` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `config_data` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User preferences storage for phpMyAdmin';


DROP TABLE IF EXISTS `pma__usergroups`;
CREATE TABLE `pma__usergroups` (
  `usergroup` varchar(64) COLLATE utf8_bin NOT NULL,
  `tab` varchar(64) COLLATE utf8_bin NOT NULL,
  `allowed` enum('Y','N') COLLATE utf8_bin NOT NULL DEFAULT 'N',
  PRIMARY KEY (`usergroup`,`tab`,`allowed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User groups with configured menu items';


DROP TABLE IF EXISTS `pma__users`;
CREATE TABLE `pma__users` (
  `username` varchar(64) COLLATE utf8_bin NOT NULL,
  `usergroup` varchar(64) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`username`,`usergroup`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and their assignments to user groups';


-- 2018-04-30 20:38:20

Can you send the data ?
I could not reproduce this issue with this data.

The tables are empty on both server. No data in it. But I've deleted the phymadmin database on one of that server where it does not work. The PHP error persist. ... 🤯

Ok, deleting phpmyadmin database solved the problem on one of the servers ?

No ...

Yes - without the phpmyadmin database it works! +1

What works ? :confused:

I have 5 Database Server that I administer with one instance of phpmyadmin.
3 have a phpmyadmin database, 2 not. One of this two ist working (the other I didn't) test. Two of the 3 with the phpmyadmin database are not working. Also with a deleted phpmyadmin database.
But... till now
Maybe its not the database, but the rights of the controluser

Thank you for explaining !
You need to find what is different between the working and non working servers.
Let me know if you find :)

Puhhh ... Created fresh new phpmyadmin database and pma user on one of the server without the database. Now I have the PHP error on that server too

This issue seems to be in the database or/and the user.
Removing the database without removing the user works (php error) ?
You are using phpMyAdmin 4.8.0 ?

The last was a typo. Wrong database name in the grant command. Now it works on that server that has no phpmyadmin database before

Maybe I found it. It was outdated, wrong data in the mysql.db table for the phpmyadmin database. Is there more proofing in 4.8.0 than in 4.7.9 ? It never be evident before 4.8.0 it seems?

Can you find this exact wrong data in one of your servers ?
And send it :)

Simple outdated/wrong hostname resp. IP number in mysql database, table db, column host for the server phpmyadmin runs. I've migrated phpmyadmin a while ago and forgotten to change the host IP in mysql.db table.
E.g. right IP for phpmyadmins home is 192.168.0.1. Change it to any other IP, flush the privileges and I have the PHP Fatal Error again. Change it back to the webserver IP phpmyadmin runs, flush privileges and phpMyAdmin works.
Before 4.8.0 improperly data in mysql.db.host has no bad consequences.

I think that you can close this issue, it is fixed by https://github.com/phpmyadmin/phpmyadmin/commit/8af0343bb288784e4c5bef91a2d84c1df5b97d94 in phpMyAdmin 4.8.1

@ntinti issue closed ?
4.8.1 is out !

Hey William

Sorry for my late answer and my thoughtlessness…

Yes now all is fine on my FreeBSD machine

Kind Regards
Nicola

All fine with 4.8.1 !

I can reproduce this on fresh installs and stock bare bones browsers. Note I pluralized browsers. Firefox, Chomium, Vivaldi, doesn't matter, with or without addons/extensions all end up the same.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings