October 19th, 2008 by jason
No comments »
I’ve completed a new blog page:
The Lab – Then and Now
A gallery documenting its evolution using VMware
To visit, just click the “Lab” menu item at the top of the page.
October 18th, 2008 by jason
9 comments »
Well how special am I? I had two paragraphs of my first blog post written and after changing to full screen mode, I lost everything I had typed! And I was just about to comment how impressed I am with WordPress. I still am but I just learned my first valuable lesson with this web based application. I am actually blown away by the flexibility and number of versatile configuration screens the admin console has. I am proof that with WordPress, anyone can have a professional looking blog, irregardless of content. Now I just need to find a decent theme so my blog isn’t mistaken for RTFM Education.
So actually this isn’t quite my first ever blog post. My first blog post was written several months ago on a different platform when I had five minutes to kill. I also write family news once in a while on my boche.net site to keep our relatives up to date on current events around our house.
Before installing WordPress, I had a few thoughts on what my first blog post should be. Helpful and insightful to the reader. As I struggled for a few hours getting WordPress to work, I knew I had a topic in the making: How To Install WordPress. Well, not so much how to install and configure WordPress, but rather how to install and configure the prerequisite platform components so that WordPress works correctly. Hopefully someone is able to follow the steps I did without wasting hours troubleshooting PHP, IIS, and directory permissions. By the way, this is on Windows Server 2003. The error message I was struggling when trying to use WordPress was “Your PHP installation appears to be missing the MySQL extension which is required by WordPress”. Here are the steps I followed to get WordPress up and running successfully:
- You need a web server. Install Windows Server 2003 and Internet Information Services 6 (IIS). Windows Server 2008 and IIS 7 may work also, but that platform introduces some significant differences which I don’t have the tested steps for. Create your new website in IIS Manager, or use the default website.
- Install MySQL 5.0.67. I used the MSI installer (file name is mysql-essential-5.0.67-win32.msi). Don’t use the .zip file. Choose an installation drive letter that’s going to provide enough disk space for your WordPress database and any other MySQL databases you might want down the road.
- Create your WordPress database by using the MySQL Command Line Client from the Start Menu. The command is CREATE DATABASE wordpress; Don’t forget the trailing semi-colon.
- Install the MySQL Administrator which you can download from the MySQL website. File name is mysql-gui-tools-5.0-r13-win32.msi. Use MySQL Administrator to create a WordPress user account that will be used by WordPress to manage the WordPress database in MySQL. When creating the user account, grant all MySQL roles for the user on the WordPress database.
- Install PHP 5.2.6 using the MSI installer (not the .zip file). File name is php-5.2.6-win32-installer.msi.�
- Perform a custom install.
- Web Server Setup: IIS ISAPI module
- Important: Choose two extensions to install: MySQL and MySQLi
- The installer will perform several key configurations for you:
- Adds your PHP installation directory to your PATH statement allowing your server to find the file libmysql.dll
- Places the two extension .DLLs in the \ext\ directory which PHP based WordPress needs
- Modifies the php.ini file to activate the two extension .DLLs
- Creates a PHP Web Service Extension in IIS and sets to Allow
- Adds the .PHP application extension and appropriate verbs to IIS
- Creates the environment variable PHPRC=(path to your PHP directory)
- Next step, set the correct NTFS permissions on your PHP directory. Allow subfolders and files to inherit.
- Internet Guest Account (IUSR_servername) = Read & Execute
- NETWORK SERVICE = Read & Execute
- Install WordPress 2.6.2 by unzipping the folder contents into the appropriate IIS directory structure for the website defined in step 1 above.
- Set the correct NTFS permissions on your WordPress installation directory. Allow subfolders and files to inherit.
- Internet Guest Account (IUSR_servername) = Modify
- NETWORK SERVICE = Modify
- In IIS Manager, modify the properties of your website. Documents tab. Enable default content page: Add: index.php
- Restart the World Wide Web Publishing service
- You’re ready to install and configure WordPress. Follow the instructions at http://codex.wordpress.org/Installing_WordPress
Using the PHP MSI installer with the appropriate options is the best use of your time. Many Google internet searches on the error message above will have you performing steps that may or may not resolve your issues if you choose to install PHP manually. None of the home brew solutions worked for me and resulted in a waste of time:
- Modifying the php.ini, changing the path for extension_dir=
- Modifying the php.ini, tweaking values for extension=
- Copying the file libmysql.dll to %systemroot%\system32\
- Adding and modifying environment variables
- Rebooting your web server
Special thanks to Michael Sharman and his website who ultimately pointed me in the direction of re-looking at the PHP MSI installer where I had missed the steps of adding the two MySQL extensions.
By the way, after struggling for a while on my production web server and not wanting to muck it up while spinning my wheels, I called on the assistance of a vanilla VMware virtual machine running Windows Server 2003 to successfully test my new installation steps (taking snapshots along the way). VMware virtualization helps save the day (again).