php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6568 phpMyAdmin 2.1.0/2.1.0.1 No Database Selected
Submitted: 2000-09-06 02:10 UTC Modified: 2001-04-27 18:47 UTC
From: botong at visto dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.0.2 OS: RH 6.2 kernel 2.2.14-5.0
Private report: No CVE-ID: None
 [2000-09-06 02:10 UTC] botong at visto dot com
Recently upgraded to PHP 4.0.2 and got these weird messages from both phpMyAdmin 2.10 and phpMyAdmin 2.1.0.1 from Benjamin Gandon. MySQL version is Ver 9.38 Distrib 3.22.32.  BTW, everything works fine with PHP 4.0.1pl2 using the stock ini from the dist file. 

The left frame of the phpMyAdmin main page shows correctly the existing databases on the server and expands correctly showing the associated tables for each database. However, when clicking on an existing database, it sends a "No tables found in database." message with all the correct forms on the page. 

Also, when clicking on an exiting table underneath an expanded database name it gives a "MySQL said: No Database Selected" message. 

Manually typing "use mysql;" and it says "Your SQL-query has been executed successfully" and again click on the the mysql database., but always get the same "No tables found in database." message. 

List of modules compiled with apache/PHP 4.01/MySQL: mod_ssl/OpenSSL, imap, XML, ftp, bcmath, mhash, mcrypt, gd1.3, db3 and ldap.

Placing the cursor mouse on the left frame with the plus sign and mysql (+ mysql), gives me the URL/query string http://localhost/db_details.php?server=1&db=mysql 

Placed some echo statements on the db_details.php to echo the $db variable like: 

      echo "database is "; 
      echo "$db \n<br>"; 
      if (isset($db)) { 
      echo ("db var has no value, isset is false \n<br>"); 
      } 

and got this : 

      database is 
      No tables found in database. 

Checked if isset($db) and it has a blank string as a value. 

When clicking on an existing table, this URL/query string is used: http://localhost/tbl_properties.php?server=1&db=mysql&table=user 

Placed some echo statements on tbl_properties.php like: 
      echo "database is "; 
      echo "$db \n<br>"; 
      $mysqlerr = mysql_error(); 
      echo ("Last MySQL error is $mysqlerr \n<br>"); 

 Result is: 

      database is 
      Last MySQL error is 
      Error 

      MySQL said: No Database Selected 
      Back 

Seems like the $db value is not being passed from the left.php script to the db_datails.php somewhere in this vicinity beginning with line 289 of left.php ... (still checking):

<div ID="el<?php echo $j;?>Parent" CLASS="parent"> 
<a class="item" HREF="db_details.php?server=<?php echo $server;?>&db=<?php echo $db;?>" onClick="expandIt('el<?php echo $j;?>'); return false;"> 
<img NAME="imEx" SRC="images/plus.gif" BORDER="0" ALT="+" width="9" height="9" ID="el<?php echo $j;?>Img"></a> 
<a class="item" HREF="db_details.php?server=<?php echo $server;?>&db=<?php echo $db;?>" onClick="expandIt('el<?php echo $j;?>');"> 
<font color="black" class="heada"> 

Wish there is some way to step through these scriptsand inspect the variables as one goes though php and html code.

Thans, this maybe a phpMyAdmin and not a PHP 4.02 bug at all. 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-06 02:30 UTC] waldschrott@php.net
duplicate
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 30 22:01:28 2024 UTC