Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PHP error on try to create the phpmyadmin without SQL files on disk #17713

@williamdes

Description

@williamdes

Describe the bug

Internal error: TypeError: PhpMyAdmin\DatabaseInterface::tryQuery(): Argument #1 ($query) must be of type string, null given, called in
libraries/classes/ConfigStorage/Relation.php on line 1643
TypeError: PhpMyAdmin\DatabaseInterface::tryQuery(): Argument #1 ($query) must be of type string, null given, called in libraries/classes/ConfigStorage/Relation.php on line 1643
Warning in ./libraries/classes/ConfigStorage/Relation.php#1515
 file_get_contents(/mnt/Dev/pma/phpMyAdmin-5.2.1-dev-all-languages/sql/create_tables.sql): Failed to open stream: No such file or directory

Backtrace

Relation.php#1515: file_get_contents(string '/mnt/Dev/pma/phpMyAdmin-5.2.1-dev-all-languages/sql/create_tables.sql')
Relation.php#1635: PhpMyAdmin\ConfigStorage\Relation->getDefaultPmaTableNames(array)
CheckRelationsController.php#43: PhpMyAdmin\ConfigStorage\Relation->fixPmaTables(string 'phpmyadmin')
Routing.php#191: PhpMyAdmin\Controllers\CheckRelationsController->__invoke(
,
array,
)
./../../../../index.php#43: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/check-relations',
,
,
)
Warning in ./libraries/classes/ConfigStorage/Relation.php#1643
 Undefined array key "pma__bookmark"

Backtrace

CheckRelationsController.php#43: PhpMyAdmin\ConfigStorage\Relation->fixPmaTables(string 'phpmyadmin')
Routing.php#191: PhpMyAdmin\Controllers\CheckRelationsController->__invoke(
,
array,
)
./../../../../index.php#43: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/check-relations',
,
,
)

To Reproduce

Steps to reproduce the behavior:

  • Delete the ./sql folder as explained on FAQ 1.44
  • On home page see the warning

The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why.
Or alternately go to 'Operations' tab of any database to set it up there.

  • Click on "Find out why"
  • Click on "Create a database named 'phpmyadmin' and setup the phpMyAdmin configuration storage there."
  • See error

Expected behavior

Show an error and do not crash

Server configuration

  • phpMyAdmin version: 5.2.1-dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA problem or regression with an existing feature

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions