Confusing changes in phpMyAdmin

I love phpMyAdmin as a quick, easy-to-learn front-end for MySQL, but it’s just broken a cardinal rule of updates by making two changes to the installation procedure in the space of three months. In principle, the changes are well-intentioned. Instead of diving into an 800-odd line configuration file, users now have the choice of creating a simple text file themselves or using a web interface to build the configuration file automatically. The idea is that whenever you upgrade, you simply move your personal configuration file to the root folder, and everything works smoothly. It doesn’t…

The new system was introduced in version 2.7.0, but if you move the configuration file, config.inc.php, from 2.7.0 to 2.8.0, it doesn’t work! What’s particularly confusing is that MySQL reports that access was refused because the root password wasn’t used. After a bit of head scratching, I tried the new web interface to create config.inc.php for me. To my mind, the web interface is badly thought out. It’s counter-intuitive and time-consuming to use. Still, using the web interface did at least create a configuration file that worked – and that was the point of the exercise.

Looking inside to see the difference, it turns out that phpMyAdmin now uses an index of 1 instead of 0 to identify the primary server. I’ve no idea if this is a permanent change or just a mistake, but it certainly defeats the purpose of a configuration file intended to make upgrades easier if it breaks on a simple point upgrade.

I’ve updated my updates for Foundation PHP for Dreamweaver 8 and Foundation PHP 5 for Flash. The really annoying thing is that three pages were reset in the second printing of the Dreamweaver book to take account of the changes in phpMyAdmin 2.7.0. These latest changes now make the updated version already out of date. I don’t mind changes like this when they’re a clear improvement, but changing the installation procedure in 2.7.0 and breaking it in the very next release, just seems like sloppy management at phpMyAdmin

This entry was posted in phpMyAdmin. Bookmark the permalink.

23 Responses to Confusing changes in phpMyAdmin

  1. Bo Johansson says:

    To the attention of David Powers

    Hello,

    I have exactly the same problem as our friend “Nobby”

    PHP cannot load mysqli extension. pls chk your php configuration – Documentation”

    I have the Apache 2.0.55 version and the latest stable versions of PHP and phpMyAdmin.

    I have seen the update of David Powers for the installation of phpMyAdmin and have made the correction in my config.inc.php file.

    I have followed, I believe, with keen attention all the instructions for the installation of these 3 programs. Over and over again I have checked everything – it took me many hours – but cannot find what has gone wrong. I still get this ugly red message “PHP cannot load mysqli extension.” when I try to open phpMyAdmin.

    So I am at a complete loss and cannot proceed further with the book. Can you tell me where the problem is and what to do?

    I saw the question of David Powers to our friend “Nobby”: “When you run phpinfo(), what does it say for Configuration File (php.ini) Path?”

    Well, if you refer to “include path” you see the result hereafter:

    include_path
    d:\php\includes

    All my programs are installed on my D hard disk.

    Help please.

    With my best regards

    Bo Johansson

    Email: bo.johan2006@wanadoo

  2. David says:

    Hi Bo,

    If you refer back to the friends of ED forum, you’ll see this reply from Nobby, who says he missed out a vital instruction in step 4 on page 66. Maybe you did the same?

    I asked Nobby what value is displayed for “Configuration File (php.ini) Path”. It’s the sixth item from the top when you run phpinfo(). If Windows isn’t reading the version of php.ini that you have been editing, you’ll just go round in endless circles. But without knowing the value of your php.ini path, I can’t even begin to help.

  3. Bo Johansson says:

    Thanks for your answer.
    The value displayed in configuration file path (the sixth from the top) reads “D:\PHP\php.ini”. I have installed your program on my D hard disk.

    The information in item 4 of page 66 which Nobby refers to reads:

    I cannot see how this instruction can solve the problem of PHP not finding mysqli.php?

    So what exactly did our friend Nobby find?

    I do hope to get helped soon so I can proceed further with the book which I find very instructive.

    A question however: Would it be possible to get all the codes downloaded for all those readers who have bought the book. In this case it will be possible to compare the code that each reader is making in his notebook with the downloaded version. That would gain a lot of time to localize errors which unfortunately are uavoidable in such a precise language as the PHP.

    I have another book “PHP for Dreamveaver 8” by David Powers. He offers this possibility and it is rteally a big and greatful time savior. What do you say?

    Best regards

    Bo Johansson
    bo.johan2006@wanadoo.fr

  4. David says:

    Sorry, Bo, your comment doesn’t make a great deal of sense to me. Perhaps you don’t realize it, but I am David Powers, the author of “Foundation PHP for Dreamweaver 8”.

    Nobby was referring to my book. As you have already indicated, I have provided download files for that book. In fact, I have done so for all my books.

  5. Bo Johansson says:

    Hi David,

    Thanks for your reply. I feel very embarassed. I made a confusion between your book and the book “php and mySql” by Larry Ullman.

    So I found the instruction in item 4 on page 66 our friend Nobby referred to in your book. Indeed I had forgotten to follow this instruction. So I proceeded immediately to follow the instruction with big hope it would solve my problem. But unfortunately not. I still get the this red ugly message that PHP cannot load mysqli.dll when I try to open phpMyAdmin.

    Regarding the Configuration File Path (the sixth on the top of the php information web page, I remind you that it reads: D:\PHP\php.ini.

    I am really at a complete loss and do not know what to do. I have spent hours trying to solve the problem but with no success.

    I will really be very grateful to you if you can help.

    All the best

    Bo Johansson
    bo.johan2006@wanadoo.fr

  6. David says:

    Ha! I wish more people would confuse me with Larry Ullman – at least to the extent of buying my books instead of his. Or perhaps I should be more generous – buying my books in addition to his.

    Have you read the section in my book titled “Avoiding the ‘Cannot load mysqli extension’ error” on pages 72-3? The problem is normally caused by Windows not being able to find libmysql.dll or using an outdated version of the same file.

    The fact that phpinfo() displays the correct path for php.ini is a good sign. At least it means that php.ini is being read, and that any changes you make to php.ini should be picked up correctly. I assume that you have included the command for mysqli in php.ini (as described in step 11 on page 63).

  7. Captain Fargon says:

    Hi folks,

    Just looking through this thread, since I have the same problem too, and regarding your comments Bo:

    In comment 4 you state that your config file says:
    “D:\PHP\php.ini.”

    In comment 1 you state that:
    “I have the Apache 2.0.55 version and the latest stable versions of PHP and phpMyAdmin.”

    I assume you’re using PHP5 and, if that is the case, should not your config be set to:
    D:\PHP5\php.ini
    i.e. the folder is PHP5 vice PHP.

    Just thought I’d throw that though your way in case it helps.

    Great book David, I powered through 70% of it within a week (happy week indeed). Now, sadly, I’ve had a problem with my computer, had to re-format it and, frustratingly, can’t get phpMyAdmin to work again due to the “PHP cannot load mysqli extension” problem.

  8. David says:

    Hi Captain Fargon,

    This “problem” arises either because you haven’t enabled mysqli in php.ini, or because the version of libmysql.dll is too old. If you have just reformatted, there shouldn’t be any problem with legacy files causing conflicts. Check the settings on page 63.

  9. Forrest says:

    Help! I am having difficulties with phpMyAdmin, Chapter 7. I think I loaded everything correctly, but I get “Welcome to phpMyAdmin 2.8.2.1
    phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server … Error MySQL said: #1045 – Access denied for user ‘root’@’localhost’ (using password: NO)”

    I went back to the phpMyAdmin set-up and re-entered the password. It asked me for the current password and I re-entered it as the new password and it appears it accepted the password. I tried using the alternative php config code you suggested in step 7 (auth_type).

    My computer is not connected to the internet. It is self-contained. I am able to download the programs off a connected computer and upload them on the my computer. Do I need to be connected to the internet for phpMyAdmin to work?

    I don’t recall for sure where my server root is, but when I look at the http://localhost/ information on firefox browser on my computer it says, SERVER[“Document_Root”] F:/websites , which is what I thought I identified as the server root, but maybe I am wrong.

    Can you help?

  10. Forrest says:

    oh, I should mention, I am using Foundation PHP for Dreamweaver 8 published by Friends of ED. I successfully made it to page 238, step 8. But things went wrong at step 9, page 238 (see above).

  11. David says:

    Did you implement the changes listed in the book’s updates page, available on my site or on the friends of ED site?

  12. Forrest says:

    I didn’t know there was one.
    I just implemented the changes and it worked.
    Thank you.

    Now, if you will excuse me, I’ve got to go back to learning PHP (and PHP on Dreamweaver), using Foundation PHP for Dreamweaver 8. I’m glad to learn how to create a comment page and look forward to creating password protected pages and a blog. Slowly, I am understanding what some of the PHP code is doing, but I am still just following instructions.

  13. Forrest says:

    I’ve been making progress. A little slow.
    Now I’ve hit another stumbling block. On page 270-272 of PHP for Dreamweaver 8, Inserting New Records- I had a little trouble because when I previewed the page and tried to enter a new quotation, I got an error message on several lines. It seemed to be saying maybe the password wasn’t accepted. I tried correcting it in the MySQL connection, but made it worse. So I set it back to the orginial and I compared my code with your code and it looked the same (except the database/connection name, because I made my own). I then put a space and deleted the space in the page, so I could re-save it in dreamweaver. When I previewed it again, I didn’t get the error messages and the fields cleared after I hit insert record. However, when I got to p. 277 and created a record navigation system, my added quote wasn’t listed like yours. I tried several times to insert the quote, but it just does not appear on the record navigation system.
    What am I missing?

  14. David says:

    Browse the contents of the database table in phpMyAdmin. If the new quotation is there, it means that the insert is working correctly, so the problem lies with quote_list.php. Use a file comparison utility to compare your file against the download file.

  15. Forrest says:

    I got the quote delete and quote update pages to work. I am thinking of starting from scratch on the insert Quote page. I wonder if I need to go back to the MySQL connection panel (step 3 of inserting new records), since the quote update and quote delete pages worked. Hmmm. If I were to repeat step 3 and screw something up there, would it screw up the update and delete pages that are working?

  16. Forrest says:

    I did check the phpMyAdmin and it said there were only 50 records (should be 51 if it was added) and the one I added was not there. 🙁

    How do I use the file comparison utility? You mean in Dreamweaver? Do I compare your chap08 file quote update file to my quote update file? or do I compare 2 other files?

  17. David says:

    Right, that narrows down your search for the answer. It means that the insert page isn’t working. That’s where you need to concentrate your efforts. The file comparison utility is described in Chapter 2 (pages 26-31). You should compare your file with the relevant file in the site_check folder.

  18. Forrest says:

    I don’t have a third-party file compare.
    I tried doing a new quote insert page, as per pg. 270-272. I got the error messages again.
    Here is what they say:
    Warning: mysql_real_escape_string() [function mysql-real-escape-string]: Access denied for user ‘ODBC’@’localhost’ (using password: NO) in F:\websites\myphpsite\admin\TMP9d0zr5jl3n.php on line 8

    Warning: mysql_real_escape_string () [function mysql-real-escape-string] A link to the serer could not be established in F:\websites\myphpsite\admin\TMP9d0zr5jl3n.php on line 8

    These two messages are repeated 2 more times

    then (this is new) the last line says, “Column ‘first-name’ cannot be null”

    But I did enter “Yogi” in the first name text area.

    Any thoughts?

  19. David says:

    If you don’t have a file comparison program, get one. Page 27 gives details of WinMerge for Windows, which is free.

    The problems with testing your page are almost certainly caused by the fact that you are using temporary files to preview pages in the browser. Go to Edit > Preferences and select Preview in Browser. Deselect the option to preview using a temporary file.

  20. Forrest says:

    Hmmm, I thought I did take the preview as temp file off. Okay. I did that, but the quote_insert page still doesn’t work.

    I was sneaking a peek at the next chapter. Does it tell me how I might insert additional/new quotes into the quote list using PHPMyAdmin? Since it is just me, maybe I could add quotes that way?

  21. David says:

    The next chapter gets into more advanced territory. Of course, you could always just use phpMyAdmin to insert new records. However, it rather defeats the purpose of using Dreamweaver to build a database-driven website. I would suggest that you go back to the beginning of Chapter 8 and start again. The time and effort that you spend now will be rewarded in the end. Inserting, updating, and deleting records are the bread and butter of working with a database. Unless you get that part right, you’ll find it difficult to make further progress.

  22. Forrest says:

    I did go back and started Chapter 8 again, but the same problem. The delete and update quote pages work. It is just the insert quote page that doesn’t work. It acts as you describe. It goes blank when I click submit and I don’t get the error messages any more, but the quote is not added to the database. I want to move on. But the idea of having a random quote generator is appealing. Am I correct in assuming the next chapter does describe how to insert quotes (or I can pick it up) using phpMyAdmin? The dreamweaver page is not working for me.

  23. david says:

    Hmmm, I thought I did take the preview as temp file off. Okay. I did that, but the quote_insert page still doesn’t work.

    I was sneaking a peek at the next chapter. Does it tell me how I might insert additional/new quotes into the quote list using PHPMyAdmin? Since it is just me, maybe I could add quotes that way?