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

    • Prime Day Deals: Save up to 50% on Samsung, Sandisk, and Lexar microSD cards by Fiza Ali Amazon Prime Day has brought discounts on a wide range of microSD cards from brands including Samsung, Sandisk and Lexar, with savings of up to 50% across both the UK and US. Below, we've rounded up the best Prime Day microSD deals currently available, including discounted Samsung's T7, T9, and P9 Express series, SanDisk Ultra, Extreme, and Extreme PRO models, as well as Lexar PLAY PRO and PLAY BLUE cards. 512GB Lexar PLAY PRO MicroSDXC Express Card: £94.98 (Amazon UK) - 41% off 64GB SANDISK Extreme microSDXC Card + SD adapter: £17.99 (Amazon UK) - 25% off 128GB SANDISK Extreme microSDXC Card + SD Adapter: £26.99 (Amazon UK) - 14% off 256GB SANDISK Extreme PRO microSD Card + SD adapter: £50.99 (Amazon UK) - 22% off 128GB Samsung T7 microSDXC Card: $32.99 (Amazon US) - 35% off 256GB Samsung T7 microSDXC Card: $51.99 (Amazon US) - 35% off 512GB Samsung T7 microSDXC Card: $94.99 (Amazon US) - 41% off 1TB Samsung T7 microSDXC Card: $239.99 (Amazon US) - 25% off 128GB Samsung T9 microSDXC Card: $36.99 (Amazon US) - 41% off 256GB Samsung T9 microSDXC Card: $57.99 (Amazon US) - 42% off 512GB Samsung T9 microSDXC Card: $104.99 (Amazon US) - 48% off 256GB Samsung P9 Express microSD Card: $39.99 (Amazon US) - 50% off 256GB SANDISK Ultra microSDXC UHS-I Card with Adapter: $41.78 (Amazon US) - 21% off 512GB Lexar PLAY BLUE microSDXC UHS-I Card: $79.99 (Amazon US) - 38% off 1TB Lexar PLAY BLUE microSDXC UHS-I Card: $159.99 (Amazon US) - 30% off 2TB Lexar PLAY BLUE microSDXC UHS-I Card: $279.99 (Amazon US) - 35% off Good to know This Amazon deal is U.S. and U.K. specific, and not available in other regions unless specified. We only use first-party seller links (at the time of article publishing); ensure that you purchase from a first-party seller link only. Check out Today's Deals on Amazon | or our recent tech deals. Become a Prime member (for Students or SNAP) via Neowin Get Prime Access - Prime for half price (for qualifying Medicaid, EBT, SNAP) Subscribe to Prime Video, Audible Plus, Music Unlimited or Kindle Unlimited via Neowin As an Amazon Associate, we earn from qualifying purchases.
    • But they will be the first asking for a bail out the moment crap goes sideways. Its just a matter of time with this AI thing unless skynet gets us first.
    • I'm so conflicted with the Google Search AI summaries. On one hand I don't like how it's harming smaller websites by greatly reducing traffic which will harm us all in the long run but on the other hand those AI summaries often give me the information I'm after. I have never once clicked on 'show me more' though and never will.
    • Not a single company as small or large it may be is obligated to subsidize its products and sell them at a loss. Your way of thinking is socialist and as a West German with a German brother state but impoverished by state dictatorship and a socialist command economy situated to the East i can tell you - this kind of thinking very quickly leads to products not being produced anymore at all. EDIT: That does not mean that I find state support for social needs unreasonable. Quite the contrary. Together with solid workers' rights we exactly had exactly that in Germany for decades in the form of the Sozialstaat which was as the scandinavian social democratic very successful - until the number of people who drew from those resources dramatically increased (ironically a project of social democrat and green proponents).
    • Apple reportedly has a second-generation iPhone Fold planned for 2027 by Hamid Ganji The iPhone Fold is one of the most anticipated tech products expected to debut this fall. It will be Apple’s first foldable iPhone, ushering in a new product category for the company. While the first generation has yet to hit the shelves, a new leak suggests Apple has already begun work on its successor. Chinese leaker Digital Chat Station claims that the second-generation iPhone Fold has already been confirmed, meaning Apple could launch a successor in fall 2027. The foldable iPhone is also reportedly referred to as the “iPhone Ultra,” though it remains unclear whether Apple will ultimately choose that branding, especially as Samsung is rumored to rename the Galaxy Z Fold 8 as the Galaxy Z Fold Ultra this year. The leaker also claims that the second-generation foldable will feature a wider folding display while reusing the same screen found in the first generation. Apple’s first foldable iPhone is expected to feature a 7.8-inch inner display and a 5.3-inch outer screen in a passport-style form factor. It has already been reported that Apple plans to change its iPhone release cycle in 2026 to spread launches throughout the year. Under this strategy, the iPhone Fold is expected to debut this fall alongside the iPhone 18 Pro and iPhone 18 Pro Max. The standard iPhone 18 and iPhone Air 2 are expected to arrive later in 2026 or in early 2027. Speaking of the iPhone Air, Digital Chat Station says Apple remains undecided about a third-generation model. The company is reportedly waiting to see how the iPhone Air 2 performs in the market, and if sales disappoint, a successor may never materialize. As we reported this week, the iPhone Air has not been scrapped from Apple’s plans. The second-generation model is reportedly scheduled for spring 2027 and could introduce upgrades such as an additional rear camera for ultrawide photography and improved battery life.
  • Recent Achievements

    • One Year In
      Vistor earned a badge
      One Year In
    • First Post
      kinowa earned a badge
      First Post
    • Rookie
      krychek57 went up a rank
      Rookie
    • Grand Master
      Jaybonaut went up a rank
      Grand Master
    • One Year In
      Philsl earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      405
    2. 2
      +Edouard
      170
    3. 3
      PsYcHoKiLLa
      131
    4. 4
      Xenon
      72
    5. 5
      neufuse
      69
  • Tell a friend

    Love Neowin? Tell a friend!