How-to Create a Windows Vista IIS7 MySQL PHP Web Server


Recommended Posts

How-to Create a Windows Vista IIS7 MySQL PHP Web Server

By: Brent Trahan, published on 09.03.07 modified 10.01.07.

Introduction

This guide shows you how to create a Windows Vista powered web server using IIS7, MySQL, and PHP (WIMP). I know, I know, a WIMP server doesn’t sound too appealing. Trust me, this server is far from a wimp and will blow your socks off if you provide the right hardware.

Note: This is a generic WIMP server that’s capable of running WordPress, PHPbb, and other popular PHP and MySQL powered web sites. You might have to change a few things to get your WIMP server running just right depending on your usage.

The Limitations

Before you go too far you need to know that IIS7 running on Windows Vista is full featured with a few limitations.

Before you right this type of server off because it’s limited you need to realize if you ever reach one of the limitations you’ll have so much traffic you could probably buy an actual server with one day’s pay from the web site.

The Limitations

Request Execution Limit: IIS7 running on Windows Vista Basic, Starter, Home, and Home Premium have a Request Execution Limit of 3. Vista Ultimate is limited to 10. Request Execution Limit is how many simultaneous pages the web server can give out at one time. That means Vista Basic, Starter, and Home editions can serve up to 259,200 pages per day and Ultimate can serve up to 864,000 pages per day!

FTP: FTP is very limited. You can only download files as anonymous. No uploading via FTP to your web server. If this is a problem, check out the FileZilla FTP Server.

Install IIS7

First thing first, we need to install a web server.

Open the Control Panel in classic view.

Double-click Programs and Features.

Click Turn Windows features on or off on the left.

Check off Internet Information Services.

Expand Internet Information Services, World Wide Web Services, Application Development Features, and then check off ISAPI Extensions. ISAPI will be needed later when we install PHP.

Click OK to install IIS7.

When the Windows Features box disappears IIS7 is installed and should be running. Test IIS7 by going to http://localhost in your web browser. You should see an IIS7 test page like the screenshot below.

The root of the default web site is located at C:\inetpub\wwwroot. Your web site goes there.

Install PHP

Now that we have a web server we need support for PHP. In this example I’m installing PHP 5.2.4.

Create a folder called php in the root of the C: drive.

Download the Windows Binaries Zip package from http://www.php.net/downloads.php.

Extract the files and save them in the php folder you just created.

Copy C:\php\php.ini-dist and save it on your desktop so we can work with it.

Rename php.ini-dist you just copied on your desktop to php.ini.

Right-click php.ini and select Edit.

Search for extension=php_mysql.dll and uncomment it by deleting the ; in front of it. This allows php to login a MySQL database.

Now move up in the php.ini code and look for extension_dir = “./”. Change “./” to “C:\php\ext”. This shows php where to load the extension=php_mysql.dll extension you just uncommented.

Save php.ini.

Copy php.ini and save it in C:\Windows.

Open the IIS Manager by typing IIS Manager in the Start Menu’s search box and click Internet Information Services (IIS) Manager in the search results.

Double-click Handler Mappings.

Click Add Script Map located on the right.

Fill out the Add Script Map window like the screen shot below.

Click OK to save the changes.

Click Yes in the window that asks you if you want to enable this ISAPI extension.

Click the back button in the IIS Manager and then double-click Default Document.

Type index.php, with a space behind , in the File names list.

Click Apply on the top right of IIS Manager.

Now you need to copy libmysql.dll from C:\php and save it in C:\WINDOWS\System32. Thanks for the fix Oruba.

Lets test to make sure php is installed and running correctly.

Open notepad.

Type < ? phpInfo() ?> in the blank document.

Note: Remove the space between < ? in < ? phoInfo() ?>. I had to add the space so the command doesn’t execute on this page.

Save it as test.php on your desktop and then move it to C:\inetpub\wwwroot.

Note: A common mistake when saving test.php is to save it as test.php.txt. Don’t forget to select All files under Save as type and then name the file test.php in notepad.

Go to http://localhost/test.php. You should get a php information page similar to the screen shot below.

Install MySQL

Before we can install MySQL we need to disable UAC in Windows Vista.

Open the Control Panel in classic view.

Click User Accounts.

Click Turn User Account Control on or off.

Uncheck Use User Account Control and then click OK.

Restart your computer.

Note: You can turn UAC back on after everything has been installed and working.

Now we can install MySQL. In this example I’m going to install MySQL Community Edition 5.0.45.

Download the Windows ZIP/setup.exe version http://dev.mysql.com/downloads/mysql/5.0.html#win32.

Unzip it and save setup.exe on your desktop.

Run Setup.exe.

The welcome window will popup. Click Next.

Since this is a general guide on creating a WIMP server leave Typical selected and click Next.

Let MySQL install in its default directory by simply clicking Install in this window.

Click Next to move through a few advertisements.

Leave Configure the MySQL Server now checked and click Finished.

Click Next at the welcome window.

I’m assuming that you don’t need to configure any advanced MySQL settings. If you did you probably wouldn’t need this guide or you should leave this job to an expert. Select Standard Configuration and then click Next.

Leave Install As Windows Service, the service name MySQL, and Launch MySQL Automatically checked and click Next.

Type the MySQL administrator (root) password twice and then click Next.

This part is VERY important. Hold your mouth just right, cross your fingers and click Execute to configure MySQL. If you did it just right you should get 4 check marks when it’s done.

Note: If you get a Connection Error, click Retry and it should work. This is caused by a slower computer not starting the MySQL service fast enough.

Click Finished.

Now that you have MySQL installed and running lets install the GUI Tools to make managing databases easy.

Download the GUI Tools (Windows x86) at http://dev.mysql.com/downloads/gui-tools/5.0.html.

Install it just like any other software.

Click Start, All Programs, MySQL, MySQL Administrator.

Fill in the fields just like the screen shot below.

Remember: Root’s password is the one you set when you installed MySQL.

Once MySQL Administrator is open, you can create a new database by clicking Catalogs and then right-clicking under test and select Create Schema.

Give it a name and there you go!

Open Port 80

Now that you have a working WIMP lets open it up to the world. All internet (HTTP) traffic passes through port 80. Let’s open port 80 to the world.

Search for firewall in the search box in the Start Menu and click Windows Firewall in the search results.

Click the Exceptions tab in the Windows Firewall Settings window.

Click the Add port button.

Type HTTP as the name and 80 as the port number.

Adjust Vista for Web Server Performance

Because Windows Vista is not meant to be a server out of the box its priorities are backwards when it’s being used as a web server. Windows Vista prioritizes programs like Word before background services like IIS7 to give the end user the best experience possible. Since we’re configuring Windows Vista as a web server background services need to be Vistas priority instead of programs.

Let’s set Windows Vista’s services as a higher priority than programs to squeeze the most speed out of it as we can.

Right-click Computer in the Start Menu and then select Properties.

Click Advanced system settings.

Click Settings under Performance in the Advanced tab of the System Properties window.

Click the Advanced tab in the Performance Options window.

Select Background services.

Click OK and then restart your computer.

Hardware

A web server with low to modest traffic doesn’t have to be a powerful machine to get the job done. Any modern PC with at least 1GBs of RAM (2GBs recommended for MySQL) will do fine. If you become one of the fortunate ones who receives enough traffic to need a high performance web server here are a few hardware tips.

Memory: If you’re expecting any kind of modest traffic (many thousands of hits per day) memory is very important. 2GBs is a good start but 3 or 4 are better.

IIS7: A powerful processor(s) and a good amount of memory are important.

MySQL: A fast hard drive and lots of memory are important for a MySQL database.

Source: http://www.maximumpcguides.com/how-to-crea.../#

http://www.maniacomputer.com/webServer/IIS.html

http://www.iis.net/default.aspx?tabid=7

http://www.maniacomputer.com/webServer/WebServer.html

Edited by Fred Derf
added clearer link to source, title and author

All of this stuff can be achieved a lot easier by Xampp which is a hell of a lot more powerful than IIS and does not have any page serving or FTP limits at all, and is increadibly easy to setup, and what is even better still, it is frequently updated with the newest versions of PHP and MySQL. Personally I would recommend using xampp over IIS

:rolleyes: The best choice with IIS7 is going with FastCGI.

Read this for a much better alternative. That guide may be for Server 2008, but Vista has IIS7, so it should be the same.

Agreed. If you use php with IIS7, use must use FastCGI to get acceptable performance and stability. The ISAPI php dll is unstable, and the CGI method has poor performance (it spawns php.exe FOR EACH REQUEST!). FastCGI uses a configurable pool of php.exe processes to handle all of the incomming requests, and is the most desirable solution.

All of this stuff can be achieved a lot easier by Xampp which is a hell of a lot more powerful than IIS and does not have any page serving or FTP limits at all, and is increadibly easy to setup, and what is even better still, it is frequently updated with the newest versions of PHP and MySQL. Personally I would recommend using xampp over IIS

Ok I will only say this once if it is better post a guide of your own :whistle:

[Thread Cleaned]

It is the general understanding that linking to other people's content, much in the same way that others link to our content, helps everyone's search rankings and increases web traffic.

If there is concern that this content was taken from another site then please contact our Public Relations staffer Marshalus. This is not the place to discuss such matters. Please note that Marshalus is likely only interested in hearing from the original author (Brent Trahan) or the site from which it was originally posted (maximumpcguides.com) or someone who officially represents either party.

If you do not represent either party but still wish to discuss the matter then you can contact me via PM and I will clarify our policy on the matter.

From this point on, please discuss the content of the thread and not the particulars of where it was from.

Thanks for the guide. (Y)

Personally I've always had better experience with Apache than IIS. Possibly because I use mostly PHP and MySQL, whereas I see IIS suited to ASP and MSSQL, although it runs PHP and MySQL if you're persistent enough to fiddle with it.

Nice guide, IIS7 looks nice but, what advantage does it offer to have PHP work with IIS over Apache? I don't use wamp though, I just install Apache and then PHP, find it less troublesome.

IIS's main advantage is its easyness, in seconds you can get a site up and running as opposed to Apache but once everything is setup, it's pretty much the same?

IIS's main advantage is its easyness, in seconds you can get a site up and running as opposed to Apache but once everything is setup, it's pretty much the same?

I should imagine it's for people who intend to use ASP.NET aswell, so need/want IIS.

  • 1 year later...
  • 1 month later...

Hi

I would like to gain any kind of help possible, URGENT:

This below is my local offline development server only:

I was on XP - > iis 5.1 >> had mysql, php installed manually,.. >> later i installed xampp since some of the scripts wont work..

Now >> I am on Windows 7 >> iis 7 >> (Fresh install)

Installed fresh xampp

Just copied all the DB files from 1 folder to xampp mysql data folder

I can access all my db's from phpmyadmin running on my local,...

Some time >> the mysql - winmysql tool >> could only see 2 DB;s >> schema and test >>

now i dont see any DB's after changing a few things here andthere..

If i try to install WP (wordpress) locally >> I can access my DB server >> but it doesnot actually create any DB Tables ...

My other local websites >> cannot see the old DB's but they can access the server >> asking for a new DB Tables to be made >>

Please help

Thank you

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Universal USB Installer 2.0.3.7 by Razvan Serea The Universal USB Installer (UUI) is a powerful bootable USB software tool for creating USB boot drives from ISO files, perfect for installing Linux or Windows, running live systems, or building diagnostic toolkits. This versatile ISO-to-USB software makes it easy to boot from USB and create Live USBs for Linux distributions, Windows setup installers, antivirus tools, and system diagnostic utilities. Whether you need a multisystem Windows Media Creation Tool, a Live USB Linux installer, or an all-in-one PC diagnostic toolkit, UUI offers a reliable and flexible Linux and Windows bootable USB creator. Effortlessly carry your favorite portable operating systems and essential troubleshooting and diagnostic tools on a single flash drive or USB boot stick. Take your preferred Live Linux distributions, Windows installers, recovery software, backup utilities, and diagnostic tools with you, all bootable from a single USB drive. No more juggling multiple USB sticks or complicated bootloaders, UUI consolidates everything into one flexible, multiboot solution. Using this open source USB boot maker software is easy as 123. To create a Linux or Windows bootable USB drive, you simply select your target flash drive, choose your distribution from the list, browse to the ISO file (or choose to download the ISO), and then click Create. Once finished, you should have a ready to run Live USB containing the Live operating system, Windows installation media, or system diagnostics utility, or advanced system cleaner tool you previously selected. Universal USB Installer 2.0.3.7 changelog: Expanded the distro and tool catalog with additional popular Linux ISO entries. Updated: several distro homepage and download links, including Ubuntu Unity, Garuda Linux, Arch Linux, Fedora, Manjaro, and SystemRescue. Fixed: ISOs added via drag and drop (or manually copied to the drive) are now listed in the removal dropdown alongside normally installed distros. Download: Universal USB Installer 2.0.3.7 | 19.4 MB (Open Source) Link: Universal USB Installer Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • You are clueless. The updates are done in the background so the next time you open Edge the updates are applied automatically. There is no need to close all your tabs. Just keep browsing like you normally do. Clearly you don't use Edge and are just one of those haters that complain for the sake of complaining.
    • I don't get this David. Can you explain it please.  
    • Microsoft is busy. Lots of changes to be released imminently for Windows server or soon. Also, lots happening for next version as well. Third party virus scanning software is being moved out of Kernel mode to avoid repeat of Crowdstrike incident. Windows Protected Mode and Windows Ready Print no longer require third party print drivers to be installed. New storage stack being developed. New NVME drivers now available for Windows Server 2025 to improve local NVME drive performance by 60+ percent. NVME-Of of fabric being worked on for next release to improve network access to NVME drives. ReFs (next file system) now has ability to boot and will become default file system in next release of Windows Server. ReFs improves on NTFS in several areas including resiliency and reliability and scalability. New update stack is being worked on to unify Windows updates, and updates for drivers and first party/3rd party application software. A stricter and more robust third-party driver certification program (ODI) is being worked on to improve performance, thermals, battery life, and reliability on modern Windows hardware by tightening how OEMs and IHVs (Intel, AMD, Qualcomm, NVIDIA, etc.) build and ship drivers. There is a tone more but too numerous to mention.
  • Recent Achievements

    • Rookie
      Rimplesnort went up a rank
      Rookie
    • One Month Later
      Markus94287 earned a badge
      One Month Later
    • Week One Done
      Markus94287 earned a badge
      Week One Done
    • One Year In
      Markus94287 earned a badge
      One Year In
    • Dedicated
      truespursfan earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      507
    2. 2
      +Edouard
      168
    3. 3
      PsYcHoKiLLa
      154
    4. 4
      ATLien_0
      90
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!