a journal of a researcher

Saturday, February 05, 2005

Configuring Apache, PHP, MySQL for Windows XP

Instead of using one-step package, I install them piece by pice on Windows XP. Pretty much you just need to follow the installation manuals. But there is a trick.

When you try php on MySQL, you will get an error message of authentication problem and asking you to update the client. The reason you get the error message is that MySQL 4.1 uses an authentication protocal based on a new password hashing algorithm that is not apparently supportet by php (or apache?). Command old_password assigns password with old algorithm.

1. Login as root to mysql at the command prompt (in windows XP sp2 select from menu start->programs->mysql->mysql command line)

2. create new account for example ‘zoooz:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'zoooz'@'localhost';

3. set password in old format:
mysql> SET PASSWORD FOR 'zoooz'@'some_host' = OLD_PASSWORD('mypass');

if you are running postnuke on local machine use ‘localhost’ as host name
And that’s all.

I put all installation requirements in this document . It is modified from this.

4 Comments:

  • I doubt Apache has anything to do with it. Again, PHP runs without Apache. PHP can talk to MySQL without Apache. PHP can be installed with Apache and so can MySQL.

    By Blogger Daniel Lemire, at 7:27 AM  

  • This comment has been removed by a blog administrator.

    By Blogger Weiwei Geng, at 12:58 PM  

  • Unlike other server-side languages, e.g. Perl, PHP doesn't require any "bridge" APIs to get access to MySQL database. In Perl, you need an module called DBI and specify the driver name to get connected, but in PHP, you can directly use the built-in functions such as mysql_connect(). This good support make the combination of PHP+MySQL be widely used in web applications.

    In this case, the PHP program becomes the "MySQL client" of the database. I see posts around discussing this error message as a upgrade issue which is in fact a PHP supporting problem. Maybe PHP5 has addressed the problem...check that out or..stay in the old 16-byte password encryption.

    By Blogger Weiwei Geng, at 1:00 PM  

  • compare webhosting services

    Can I Help You.. Yes If you want to get on the web. If you want to start learning about creating a web site of your own.. go to http://webhost11.com. to find out more about compare webhosting services ... We can help find a web host for you.

    By Anonymous compare webhosting services, at 5:46 PM  

Post a Comment

<< Home