Successful configuration of WAMP after mySQL error 1251
Last evening when I left, I had kind of resigned to myself with the thinking that maybe I can never really get PHP to work as an apache module on Windows, and I should just work within IIS and use ISAPI rewrite to rewrite the URLs for SEO.
When I got home though, something told me that maybe the PHP is the bad boy since the DB works and can be seen, but mod_rewrite will not work cause whenever I install PHP as an apache module, it cannot access mySQL and that is where problems begin. So I got to work and after some consoling surf, I decided that maybe I should downgrade to PHP 4.x since that is what my host runs. I removed it and after a little tinkering, I had PHP 4.4.2 running, with a few problems though… PHP could see it from both IIS and Apache, and the DB was now available as a module of apache, but ll the web applications were not able to authenticate properly because of some error 1251 - http://codex.gallery2.org/index.php/Gallery2:faq#MySQL_.22Client_does_not_support_authentication_protocol.22_error
I did my best to rewrite the user-names and passwords in the DB in the shorter OLD_PASSWORD - http://dev.mysql.com/doc/refman/4.1/en/old-client.html format, but nothing-doing… and I even got to learn a thing or two about trusting the command-line more than the mySQL admin application which seemed like ti was working, but I was still not able to go in. I read more information about what causes this to happen and it all seemed to point to the use of a client that is older than 4.1x. I knew that I was using newer tools, but sill had not answer until I read this details http://dev.mysql.com/doc/refman/4.1/en/password-hashing.html explaining that an outdated mysqli.dll file can cause the problem as well as underlining the fact that 4.xx is not meant to have that file as mySQL in inbuilt http://dev.mysql.com/doc/refman/4.1/en/php-problems.html I removed the file and when I reloaded phpmyADmin, it loaded and I was feeling like a happy child receiving a gift. I rushed and reloaded Drupal… it did not see the DB… I went local to the server and IE loaded drupal like a charm (caching issues)… I cleared cache on my workstation Firefox and reloaded the file… but before it could even show the page, Iw as over on the server trying to implement clean URLs… I modified .htaccess and went back to see what the name was (previously, I had changed it's name cause Windows had refused to let me use a name that begins with a ., but I found out that in HTML-Kit, since I guess it writes Unix names, it had renamed it without issues.). I looked in the .htaccess file to make sure that I had things set right… I removed some commenting I had put there before and save the file… Switched Drupal to clean URLs and expected to see a 404 error as I had before.
The page loaded… I clicked on a another link (create content) and it loaded it too without a problem and the URLs were clean… it was 14hxx, I stood up, sighed and picked my lunchbox… I was happy and relieved that I had finally found the culprit that was making my life so difficult.
Some might opt to use pre-packaged applications like XAMPP - http://sourceforge.net/projects/xampp to get their WAMP applications running in no time, but that is never recommended in a serious production setup. If you take the time to setup each piece and tinker, break, troubleshoot, and finally fix and tweak it, you will be better placed to maintain the setup as you will understand it and will not fear to make adjustments or preventive changes.
Here is a good resource on how to get WAMP to install nicely on Windows http://blogcms.com/?query=htaccess&amount=0&blogid=1&x=0&y=0


