Solved

phpMyAdmin - cannot browse tables (windows version)

Posted on 2006-06-10
7
626 Views
Last Modified: 2013-12-12
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.
0
Comment
Question by:CIC Admin
  • 4
  • 3
7 Comments
 
LVL 5

Author Comment

by:CIC Admin
ID: 16877963
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.
0
 
LVL 29

Expert Comment

by:fibo
ID: 16881529
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
0
 
LVL 5

Author Comment

by:CIC Admin
ID: 16893652
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.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 29

Accepted Solution

by:
fibo earned 500 total points
ID: 16893934
1 - [when displaying the phpinfo page, look for mysql extensions: are they visible and active?]
Not needed 'cause of your answer 3

2 - Coherent with your answer 3

3 - So mysql is working, php is working, and they succeed in cooperating fine.
phpMyAdmin, since it is a "normal" php script should do too.
If it does not, then that should be related to config.inc.php (but where...)

4 - As far as I remember, you have 2 ways to make php run on IIS, cgi and dll. And I think I remember that one of these has a non-standard way of handling sessions and cookies... There are several ways to run phpMyadmin, you might be using one of the modes that is handled differently...
a - compare the 2 php info from your machines
b - which access mode do you currently use for phmpmyadmin? the 3 possible values (config.inc.php circa lines 80-90) are config, http or "cookie based". Are you using the same on both machnes? which one(s)?
0
 
LVL 5

Author Comment

by:CIC Admin
ID: 16894820
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.  :-)
0
 
LVL 29

Expert Comment

by:fibo
ID: 16895561
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!)
------
0
 
LVL 5

Author Comment

by:CIC Admin
ID: 16900167
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
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Wordpress Query 1 34
php mail headers 2 12
Button Click 11 25
Jquery Autocomplete PHP script 3 21
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now