I’m not the kind of person who likes blogging, but ever since I decided to switch my WAMP (Windows-Apache-Mysql-php) server to IIS on my Vista machine, I have been tackling one technical problem after another. To share my experience and for my own personal reference, I thought making an article on the process will help.
First, lets understand Vista Business. Vista, as a whole, was not really made for computers; it was made for users. It has many features to make the user experience as pleasant as possible. However, Microsoft failed miserably at hardware compatibility, and technical documentation. When I first bought my machine, within the first week, I had a hard-drive failure. It was not a full failure so it appeared that windows was the problem as it was not getting past the splash page, where the system loads. Windows Vista was not kind enough to report the problem, it simply would stay on that screen for nearly 45 minutes and then shutting down.
This problem was soon after the vista OS had been released, and before the first service pack was released. I spent a great deal of time on the phone with tech support. At first, they were VERY resistant to assisting me until they were able to verify that my computer did not come with Vista Business, that I had purchased their upgrade version which gave me the right to access their tech support.
After getting through tech support, they quickly escalated the issue and I started working with their experts on getting the system repaired. What I learned was that, Vista business is a powerful, but often undocumented server architecture.
I plan on making this tutorial more technical in the future, but for now, so I can get back to work on my current technical issue, I will explain the steps I took in getting IIS (Internet information services) working on Vista Business.
First, you must enable IIS as it was not enabled by default in my version of Vista Business. Go to the Control Panel, and under Programs and Features click Turn windows features on/off. Select the Internet Information Services branch, and make sure all IIS features are enabled. While in there, you may also want to enable FTP and other network services. After completing this step, and possibly a reboot, you should be able to point your web browser to http://localhost to view the default IIS home page which is hosted on your computer.
Once you have IIS installed, you should go through your system and uninstall any versions of 2005 Microsoft Visual Studio products and replace them with visual studio 2008. C#2008 is really the only product you will need, and don’t be surprised if it says that it failed to install the MsSQL server. It took me 2 days to get MsSQL installed and running properly. This is because many of the MsSQL installers you will find online are not fully functional.
Next you will want to configure your web server and install additional features. First, locate and install Microsofts Web Platform Installer. This can be found at (http://www.microsoft.com/web/downloads/platform.aspx). Once installed, you can find it in the IIS Manager found under the start menu > all programs > administrative tools. Open that to access the web platform installer, and start installing the features you want, and configuring your server. Some will require additional features to be installed. Let the system add any packages it wants. If it asks for something that is missing, install it on your own. Almost everything it asks for can be found for download online at no cost. You can and should install PHP support from here to make sure the system is working, but you will want to replace it with a custom install of PHP as the web-platform installer only installs the default PHP features which doesn’t include many common modules, such as the socket module which are needed for many web sites.
Installing MsSQL support may be very complicated, but here is what you need to know. First of all, the Microsoft Programmers where, in my opinion, are very LAZY!!! It seems that when installing the MsSQL system, it determines the login username by taking the full login name: MySystemMyUsername and deleting ANY reference to the name of the system and the slash. If your login name and system name are the same, you will not be able to get MsSQL installed because it can’t find user. If your system name is the same as your username, change the name of your system now! Had I known sooner, it would have saved me over 10 hours of headaches. You should also know that MsSQL can run multiple named copies of itself called instances. Each will be installed into its own folder in C:Program FilesMicrosoft SQL Server normally. You can download the MsSQL installer online which first installs itself onto your system as the installer is used to change features of your MsSQL instances. On my machine, the installer which was installed does not work, it produced popup stating it cannot find the installation media. I was able to get around this by running one of the original MsSQL installer .exe files which I downloaded online (SQLEXPR_X86_ENU.exe). When you find an installer that works, keep it in an easy-to-remember and easy-to-access folder, as you are likely to need it again in the future. I also had to make changes to my registry to do an install.
Before you can install the installer, you must pass a system configuration check. My installer was reporting that I needed to reboot, and after rebooting several times, I found that in order to get my system to pass the check, I had to delete a registry key which re-installs itself after every reboot. Open the registry editor (regedit.exe) and locate “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manager” remove the entry named “PendingFileRenameOperations“. You can save the key, and restore it later, but that is usually unnecessary as the documentation I’ve seen says this key gets deleted after boot-up. Meaning, if present, there is an application or device driver generating the key every boot.
After installing and upgrading IIS and MsSQL to your liking, you should locate FastCGI on the net and install it via the Web Platform Installer. This will be needed to do a custom install of PHP. I found that the windows version of PHP 5.2.13 works well with my Vista Business setup. Download the installer off the net, choose the IIS FastCGI install option, and enable all of the features you would like.
I opted for all features of PHP to be installed, but found that many of the dll’s do not work. When I installed PHP it was installed into C:Program FilesPHP, so I was able to get PHP working by editing the C:Program FilesPHPphp.ini configuration file and disabling all of the extra modules. Some web applications will produce “function X not found” errors because they assume a module is installed. You can fix this by going back in the .ini file and enabling the associated extension. I am a web developer so I simply include code in my PHP applications to load the extensions at runtime. Developers should also enable displaying of errors, and in most cases non-developers should enable this feature so that when something goes wrong, you do not end up staring at a blank screen having no clues as to what went wrong.
Download and install the latest (MSI) version of mySQL community server from MySQL’s website at http://dev.mysql.com/downloads/.
Ok, you should now have an IIS web server with MsSQL, MySQL, PHP, ASP (which comes pre-installed in IIS)!