Phpmyadmin: Uncaught TypeError: Argument 1 passed to PhpMyAdmin\\CheckUserPrivileges::__construct() must be an instance of PhpMyAdmin\\DatabaseInterface

Created on 20 May 2018  路  3Comments  路  Source: phpmyadmin/phpmyadmin

Using QA_4_8 or master.

I get this error when using the setup script. It may be triggered through other means as I have several of these in my logs, or it could all be from the same error. To reproduce, go in the setup script, press the "New server" button, and click "Apply" to use the defaults.

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to PhpMyAdmin\\CheckUserPrivileges::__construct() must be an instance of PhpMyAdmin\\DatabaseInterface, null given, called in /var/www/pma-dev/fork/QA_4_8/libraries/check_user_privileges.inc.php on line 14 and defined in /var/www/pma-dev/fork/QA_4_8/libraries/classes/CheckUserPrivileges.php:30
Stack trace:
#0 /var/www/pma-dev/fork/QA_4_8/libraries/check_user_privileges.inc.php(14): PhpMyAdmin\\CheckUserPrivileges->__construct(NULL)
#1 /var/www/pma-dev/fork/QA_4_8/libraries/classes/Navigation/NavigationTree.php(20): require_once('/var/www/pma-de...')
#2 /var/www/pma-dev/fork/QA_4_8/vendor/composer/ClassLoader.php(444): include('/var/www/pma-de...')
#3 /var/www/pma-dev/fork/QA_4_8/vendor/composer/ClassLoader.php(322): Composer\\Autoload\\includeFile('/var/www/pma-de...')
#4 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('PhpMyAdmin\\\\Navi...')
#5 /var/www/pma-dev/fork/QA_4_8/libraries/classes/Navigation/Navigation.php(52): spl_autoload_call('PhpMyAdmin\\\\Navi...')
# in /var/www/pma-dev/fork/QA_4_8/libraries/classes/CheckUserPrivileges.php on line 30, referer: http://192.168.1.10/pma-dev/fork/QA_4_8/setup/index.php?tab_hash=&check_page_refresh=1&token=WqR%7F%25JY%27a%5D%2BS%7Et%21X&page=servers&mode=add&token=WqR%7F%25JY%27a%5D%2BS%7Et%21X&submit=New+server
bug

All 3 comments

getting error when in errorlog file first time setup on server with phpMyAdmin-4.8.1-all-languages

[07-Jun-2018 12:45:01 UTC] PHP Notice: Undefined index: dbi in /home/halotele/public_html/domains/domain.com/inhouse/PhMyAdmin/libraries/check_user_privileges.inc.php on line 14
[07-Jun-2018 12:45:01 UTC] PHP Catchable fatal error: Argument 1 passed to
PhpMyAdmin\CheckUserPrivileges::__construct() must be an instance of PhpMyAdmin\DatabaseInterface, null given, called in /home/halotele/public_html/domains/domain.com/inhouse/PhMyAdmin/libraries/check_user_privileges.inc.php on line 14 and defined in /home/halotele/public_html/domains/domain.com/inhouse/PhMyAdmin/libraries/classes/CheckUserPrivileges.php on line 30

Kind of the same error as #14752

@mauriciofauth Can you please fix this one ?, I would add an if (isset($GLOBALS['dbi'])) to all the contents of libraries/check_user_privileges.inc.php but I am not sure this is a good idea..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexeyKosov picture AlexeyKosov  路  3Comments

barkermn01 picture barkermn01  路  3Comments

saulotoledo picture saulotoledo  路  3Comments

svivian picture svivian  路  3Comments

marcomarsala picture marcomarsala  路  3Comments