[Phpmyadmin-devel] PMA_safe_db_list()

Hi, PMA_safe_db_list() first tries to use SHOW DATABASES if it fails it tries mysql.db and inside this code there is a query with SHOW DATABASES again ... why? did i missed something there? -- Sebastian Mendel www.sebastianmendel.de

Sebastian Mendel schrieb:
Hi,
PMA_safe_db_list() first tries to use SHOW DATABASES if it fails it tries mysql.db and inside this code there is a query with SHOW DATABASES again ... why?
did i missed something there?
and all this workaround if SHOW DATABASES is disabled does not work, at least as i tried it by just always returning empty array from PMA_DBI_get_dblist() tested with root having all rights and additional explicit to `mysql` and `phpmyadmin` any clues? -- Sebastian Mendel www.sebastianmendel.de

Sebastian Mendel a écrit :
Sebastian Mendel schrieb:
Hi,
PMA_safe_db_list() first tries to use SHOW DATABASES if it fails it tries mysql.db and inside this code there is a query with SHOW DATABASES again ... why?
did i missed something there?
and all this workaround if SHOW DATABASES is disabled does not work, at least as i tried it by just always returning empty array from PMA_DBI_get_dblist()
tested with root having all rights and additional explicit to `mysql` and `phpmyadmin`
any clues?
Sebastian, I have to work now but I'll look at all your questions in about 3 hours. Marc

Marc Delisle schrieb:
Sebastian Mendel a écrit :
Sebastian Mendel schrieb:
Hi,
PMA_safe_db_list() first tries to use SHOW DATABASES if it fails it tries mysql.db and inside this code there is a query with SHOW DATABASES again ... why?
did i missed something there? and all this workaround if SHOW DATABASES is disabled does not work, at least as i tried it by just always returning empty array from PMA_DBI_get_dblist()
tested with root having all rights and additional explicit to `mysql` and `phpmyadmin`
any clues?
Sebastian, I have to work now but I'll look at all your questions in about 3 hours.
sending more mails does not mean that i want to force you to answer my questions, it is just to keep the list up to date with my 'investigation' ... i know that you not ignore any messages sent here :-) and i just need confirmation that this does not only not work on my system. i just try forcing phpMyAdmin to walk through all possible ways - and i just found out that most of the fallback code does not work there - i think it is just that nobody runs a ver SHOW DATABASES disabled ... -- Sebastian Mendel www.sebastianmendel.de

Sebastian Mendel schrieb:
Marc Delisle schrieb:
Sebastian Mendel a écrit :
Sebastian Mendel schrieb:
Hi,
PMA_safe_db_list() first tries to use SHOW DATABASES if it fails it tries mysql.db and inside this code there is a query with SHOW DATABASES again ... why?
did i missed something there? and all this workaround if SHOW DATABASES is disabled does not work, at least as i tried it by just always returning empty array from PMA_DBI_get_dblist()
tested with root having all rights and additional explicit to `mysql` and `phpmyadmin`
any clues? Sebastian, I have to work now but I'll look at all your questions in about 3 hours.
sending more mails does not mean that i want to force you to answer my questions, it is just to keep the list up to date with my 'investigation' ... i know that you not ignore any messages sent here :-)
and i just need confirmation that this does not only not work on my system.
i just try forcing phpMyAdmin to walk through all possible ways - and i just found out that most of the fallback code does not work there - i think it is just that nobody runs a ver SHOW DATABASES disabled ...
should read: i think it is just that nobody runs a server with SHOW DATABASES disabled ... -- Sebastian Mendel www.sebastianmendel.de

i think it is just that nobody runs a server with SHOW DATABASES just recently one user complaining in the german forum not being helped correctly. He searched 10 days to find out by himself that --skip-show-databases was his problem.
-- View this message in context: http://www.nabble.com/PMA_safe_db_list%28%29-tf2044851.html#a5633250 Sent from the phpmyadmin-devel forum at Nabble.com.

Jürgen Wind schrieb:
i think it is just that nobody runs a server with SHOW DATABASES just recently one user complaining in the german forum not being helped correctly. He searched 10 days to find out by himself that --skip-show-databases was his problem.
he couldn't see any database in the list? -- Sebastian Mendel www.sebastianmendel.de

leere Datenbankliste "Keine Datenbanken" that's obviously from the navi frame -- View this message in context: http://www.nabble.com/PMA_safe_db_list%28%29-tf2044851.html#a5634123 Sent from the phpmyadmin-devel forum at Nabble.com.

Sebastian Mendel a écrit :
Sebastian Mendel schrieb:
Hi,
PMA_safe_db_list() first tries to use SHOW DATABASES if it fails it tries mysql.db and inside this code there is a query with SHOW DATABASES again ... why?
did i missed something there?
and all this workaround if SHOW DATABASES is disabled does not work, at least as i tried it by just always returning empty array from PMA_DBI_get_dblist()
tested with root having all rights and additional explicit to `mysql` and `phpmyadmin`
any clues?
I confirm that for PMA 2.8.2 on MySQL 4.1.21 running with --skip-show-database, a user without the SHOW DATABASES privilege sees no databases. I doesn't even execute PMA_safe_db_list() ! Marc

Sebastian Mendel schrieb:
Hi,
PMA_safe_db_list() first tries to use SHOW DATABASES if it fails it tries mysql.db and inside this code there is a query with SHOW DATABASES again ... why?
did i missed something there?
if SHOW DATABASES is disabled, and the user has the Select_priv = Y he will not see any database -- Sebastian Mendel www.sebastianmendel.de

next problem: $rs = PMA_DBI_try_query($local_query, $GLOBALS['controllink']); if ($rs && @PMA_DBI_num_rows($rs)) { this does not work with mysqli ... it took me some time to find it out, DAMN @!!! call to PMA_DBI_try_query() requires PMA_DBI_QUERY_STORE for PMA_DBI_num_rows() to work. i am working on this ... -- Sebastian Mendel www.sebastianmendel.de
participants (3)
-
Jürgen Wind
-
Marc Delisle
-
Sebastian Mendel