Installing Apache httpd 2.0.54, MySQL 4.1.11, PHP 5.0.4 and phpMyAdmin 2.6.2 on Windows

A bit tricky, but I finally got the whole lot working.

If you want to have the ability to administer your MySQL server remotely, phpMyAdmin is the perfect companion.

  • Start with the usual httpd installation, nothing needs to be altered.
  • Install MySQL.
  • Extract the full PHP 5.0.4 distribution into c:php.
  • Extract the phpMyAdmin 2.6.2 distribution into C:Program FilesApache GroupApache2htdocs.
  • Open up http.conf in the httpd conf directory, usually C:Program FilesApache GroupApache2conf.
  • At the bottom of the LoadModule section, add:

LoadModule php5_module "c:/php/php5apache2.dll"

  • At the end of the file, put:

PHPIniDir "C:/php"

  • Put this somewhere in the same file:

AddType application/x-httpd-php .php

  • Find the DirectoryIndex directive and add index.php to it, like this:

DirectoryIndex index.html index.html.var index.php

  • Go to your PHP installation directory, usually c:php.
  • Copy the php.ini-recommended and name it php.ini.
  • Open php.ini in a text editor (I still use JEdit :-)
  • Find the lines (not necessarily after each other):

;extension=php_mysql.dll ;extension=php_mbstring.dll

  • Uncomment those by removing the semi colon in the beginning, so the look like this:

extension=php_mysql.dll extension=php_mbstring.dll

  • Add this line somewhere in the [mbstring] section:

mbstring.internal_encoding = UTF-8

  • Save the file.
  • Open the ext directory, usually c:phpext.
  • Copy the php_mysql.dll to the Apache bin directory, usually C:Program FilesApache GroupApache2bin (you could of course put the c:phpext directory in your PATH environment variable…).
  • Edit the config.inc.php in the phpMyAdmin directory
  • Find $cfg[‘PmaAbsoluteUri’] and enter the absolute URL to phpMyAdmin
  • Enter a magic word/password at $cfg[‘blowfish_secret’]. This is used by the cookie mechanism in the next step.
  • At $cfg[‘Servers’][$i][‘auth_type’], enter ‘cookie’.
  • Save the file
  • Fire up the MySQL and Apache services
  • Open a web browser, I prefer Mozilla Firefox
  • Open the phpMyAdmin index.php. On my test system, this is http://myserver:8080/phpMyAdmin/index.php.
  • That’s it!