ID:               6569
 Comment by:       domin_80 at o2 dot pl
 Reported By:      botong at visto dot com
 Status:           Bogus
 Bug Type:         MySQL related
 Operating System: RH 6.2 kernel 2.2.14-5.0
 PHP Version:      4.0.2
 New Comment:

Had the same problem. It seems register_globals directive is the case.
This directive is off by default in newest PHP releases due to security
reasons. Setting it on (check your php.ini) makes MyAdmin works,
although it is not recommended to do so.


Previous Comments:
------------------------------------------------------------------------

[2000-09-06 02:32:19] [EMAIL PROTECTED]

duplicate

------------------------------------------------------------------------

[2000-09-06 02:11:11] 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.



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





------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=6569&edit=1

Reply via email to