(This assumes you already know how to actually install Apache2 and MySQL5 properly, and setup a database with a user for WordPress).

A quick note about WordPress installations on Windows Server 2003. After installing Apache2, MySQL Server Community Edition, and extracting PHP5 (Protip: don’t use the installer, just download the .zip file and extract it to a folder on your server, eg. C:php), configure the php.ini file in the PHP directory as normal, with the following changes to avoid issues with MySQL not integrating with PHP correctly:

1) Set extension_dir to the absolute path of the extensions directory. So if you extracted PHP to C:php, you need to set extension_dir to “C:phpext”. Do not use relative paths!

2) Remove the semi-colon from the line extension=php_mysql.dll.

3) Set the upload_tmp_dir path to an existing folder. I’d suggest making a new temp folder, such as C:phptemp.

4) Configure mysql.default_port and mysql.default_host with the correct values for your MySQL server.

5) Set the doc_root parameter to where-ever you plan on storing your the files for your site. This needs to be the same as the document_root parameter in Apache2′s httpd.conf.

Now you just need to configure Apache2 to correctly use PHP5. Add the following lines to httpd.conf (note the slashes used – don’t use backslashes!):

LoadModule php5_module “c:/php/php5apache2_2.dll”
AddType application/x-httpd-php .php
PHPIniDir “C:/php”

Even though the installation instructions included with PHP say to use php5apache2.dll, we have to use php5apache2_2.dll, otherwise Apache2 will fail to start. All that’s left now is to copy libmysql.dll and php5ts.php from the PHP directory to C:WindowsSystem32.

With this done, you should be able to restart Apache2, and you hopefully won’t get any errors! To test and make sure that PHP5 is working, and that MySQL5 is accessible, create a new file in your site root (the same folder that doc_root and document_root point to) called info.php, and put the following line in it:

<?php phpinfo(); ?>

Open your webbrowser, and type http://localhost/info.php in to the address bar, and you should get the standard PHP Info page. Do a search for MySQL, and you should have a heading for it. If so, you’re ready to install WordPress. If not, then double-check your configuration.

1 Comment

  1. [...] posted here: WordPress Installation on Server 2003 x86 with Apache2/PHP5/MySQL5 Related ArticlesBookmarksTags RinkAtlas Restored After Another Server Crash It takes a bit [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>