Tim Huffam

Dotting the I and crossing the T of I.T.

  Home  |   Contact  |   Syndication    |   Login
  153 Posts | 0 Stories | 2415 Comments | 653 Trackbacks

News

Archives

Post Categories

Interesting Blogs/Links

Wednesday, February 04, 2009 #

On a fresh php installation (on WinXP using IIS 5) the mysql extension did not load.  This turned out to be because php could not find the libmysql.dll library - to resolve just put the php dir (eg "c:\xampp\php) and the ext dir (c:\xampp\php\ext) into the PATH environment variable (and restart iis).

To verify your php configuration, create a php file with the following content:
<?php
phpinfo();
?>
Save this as something like info.php into your web root dir and navigate to it with a browser eg http://localhost/info.php.

FYI - this is how I installed my own WIMP stack:

  1. Instead of doing the usual individual custom installs of these components - this time I simply downloaded the xampp and unzipped it into a dir off c: drive (c:\xampp).  This contains apache (which I won't use), mysql, php and phpmyadmin.
  2. To setup php in IIS simply add an extension mapping (mapping .php to c:\xamp\php\php5isapi.dll) - in IIS admin right click on Default Web Site  (or your other specific web site if on a windows server) and select Properties - click on Home Directory tab then click on 'Configuration...' - then click on Add and enter the details.
  3. In IIS admin create a virual directory (eg pma) pointing to the phpmyadmin dir (C:\xampp\phpmyadmin)
  4. Create an envirnment variable PHPRC and set it to your php path eg C:\xampp\php
  5. Add the php (c:\xampp\php) and ext (c:\xampp\php\ext) paths to the PATH environment variable.
  6. Run the xampp setup script: setup_xampp.bat
  7. Restart IIS (iisreset).
  8. I've also edited httpd.conf (under c:\xampp\apache\conf) to change apache to use port 81 - so I can still run apache and IIS side by side (IIS uses port 80 by default for).

That should do it. 

To test start mysql (run the mysql_start.bat script in the xampp dir) and browse to: http://localhost/pma/index.php

HTH
Tim