Link to home
Start Free TrialLog in
Avatar of CIC Admin
CIC Admin

asked on

phpMyAdmin - cannot browse tables (windows version)

I have been pulling my hair out over this one and have decided it is time to ask an expert.

I am trying to set up a 2nd machine identical to my laptop running PHP, MySQL, and phpMyAdmin.  Everything is working fine with the exception of when I try to browse a table in phpMyAdmin, the page display only so far and then stops.  I get all of the left pane, the top row that has server -> local host, database -> mysql, table -> user  and then the next row (the row of tabs) starts with browse showing fine, but the next one (structure) starts displaying as text.  Sometimes it gets a little farther than other times, but never much.  For example, sometimes it will show

[browse] <a class="

and end there.  Other times it will show

[browse] <a class="tab" href="tbl_properties_structure.php?lang=en-iso-8859-1&server=1&collation_connection=utf8_unicode_ci&db=mysql&table=user&goto=tbl_properties.php&back=tbl_propertie

The [browse] above represents the browse tab with icon that displays correctly.

Everytime, though, it ends abruptly.  If I view source on the page it ends just as suddenly there as well.

I know the data is there, as I can go into export tab, export the data from any table, and it shows up just fine.  All other phpMyAdmin pages work just fine as well.  Only the browse page is not displaying.

I have done everything I can think of to get it as close to the laptop version as possible, but still cannot get it to work.

Versions
phpMyAdmin 2.7.0-pl2
mySQL 4.0.18
PHP 5.0.4

I started with the most current version of phpMyAdmin (2.8.1) which gave the same error so decided to downgrade to the version which is working on my laptop, but had the same problem.

Thanks for your time.
Avatar of CIC Admin
CIC Admin

ASKER

After a bit more testing, I noticed that the SQL tab lets me type in a SELECT statement, but instead of returning the results, it gives the same error as above.  Which is guess is doing basically the same thing the browse tab does.
Avatar of Bernard Savonet
Since you have a new setup, some points need to checked in that order:
1 - Link PHP/ MySQL: You are using php5. Did you enable the mysql extension? this was standard with php <5, but now needs some additional action. Use PHPINFO to check what is happening
2 - MySQL: check in a dos-box in "command line mode" what is the current content of your base. Maybe phpmyadmin goes amok because of some strange content here, including MySQL not running...
3 - Build a simple sample php program using mysql eg, to display some SELET you have handy or any other simple thing: you just want to check if it is working. If your base is empty, create a simple table with one or 2 fields from the command line interface of previous step. Input data manually before launching your php script
4 - If this work, and phpmyadmin does not: Take a note of which MySQL setup parameters you need for phpmyadmin. Delete the complete directory, reinstall it.

Tell us the results
Ok, let's see . . .

1 - I do have the line in my php.ini file enabling the mysql extension.  I have :

    . . .
    ;extension=php_mssql.dll
    ;extension=php_msql.dll
    extension=php_mysql.dll
    ;extension=php_oci8.dll
    ;extension=php_openssl.dll
    . . .

    php_mysql.dll is located in the c:\php\ext directory.

   What should I look for in PHPInfo to help you?

2 - I can use mysql.exe from the command line, log in, and do SELECTs on all the tables.  All the data is there.

3 - Since this is a second installation, I already have a lot of databases and PHP pages created.  I copied the data over and these PHP pages are working just fine.

4 - I have deleted phpMyAdmin completely on a couple different occasions.  Tried starting fresh with a new config.inc.php file too.  Even tried different versions.  All with the same result.

Seems like it must be a phpMyAdmin thing since everything else is working fine, but I don't want to jump to conclusions.

One other thing I don't think I added above was the fact that PHP is running on IIS.  This is the case on my laptop too.
ASKER CERTIFIED SOLUTION
Avatar of Bernard Savonet
Bernard Savonet
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have always used "config" in the past.  Never tried "http" or "cookie" on any install.

Good point about the CGI and DLL on the IIS machine, though.  I will take a deeper look into this when I get home tonight.  In troubleshooting this, I have completely uninstalled and reinstalled both phpMyAdmin and mySQL.  Maybe it is time to try doing that to PHP.

I will also go over my PHPINFO screen line by line and report any differences.

Thanks for your continued help!

Another note : Since I needed access to those tables and could not get phpMyAdmin to work, I started searching for alternatives to phpMyAdmin.  I downloaded a copy of NaviCat.  It is an application you install and is basically the MS SQL Enterprise Manager equivalent for mySQL.  It is a 30 free trial, and worked like a charm.  And by the way, it displayed all the tables without a problem.  I still very much want to get phpMyAdmin working, so I guess we have 29 days left to solve this problem.  :-)
Also have a look at DBTools Manager.
------------
Another test to do: put a password to your user, both in config.inc and (of course!) in mysql uer tables. It seems that in some occasions with IIS this might create a problem (I don't understand why, but then there are so many things I don't understand!)
------
SUCCESS!!!

After comparing the phpInfo screens, I noticed that the Client API Version line in the mySQL section did not match.  One was 4.0.18 and the other was 4.1.7.  Doing a little searching, I found the Client Version was determined by the libmysql.dll file.  I had suspected this file early on, and checked the versions on numerous occasions.  This new info caused me to look closer and I discovered that although I had matching libmysql.dll files in the same correct locations on both machines, there was a different (correct) version in an old c:\phpold2 directory on the working machine.  This DLL must have been registered and active even though it was in an old unused directory.  Once I copied that new good file to the second computer, I refreshed phpinfo and the new 4.1.7 version showed up.  Feeling confident, I did another table browse and it worked like a charm!

Thanks so much for the help, Fibo, and enjoy the points!
Kent