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

  Leo Natan said:
: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.

  Shane2 said:
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?

  Quote
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

    • I have the Pixel 9 Pro XL...Unless this thing is "leaps and bounds" faster than the 9, I'll pass. And by leaps and bounds, I don't mean on benchmarks. "Real world" faster. Most people don't even come close to topping out the performance of their phones. Tensor G5 is Google's most powerful chip to date, boasting a staggering 36 percent performance leap over G4.
    • MIT's stunning 'bubble wrap' device squeezes water out from thin air even in deserts by Sayan Sen Image by Matteo Roman via Pexels Massachusetts Institute of Technology (MIT) engineers have built a new kind of device that can pull clean drinking water straight out of the air—no electricity needed. It’s designed for areas where water is scarce and traditional sources like rivers or lakes aren’t reliable. Right now, more than 2.2 billion people globally don’t have access to safe drinking water. In the United States alone, 46 million face water insecurity, with either no running water or water that’s not safe to drink. This new device, called an Atmospheric Water Harvesting Window (AWHW), uses a unique hydrogel panel that looks like black bubble wrap. These dome-shaped bubbles soak up water vapor from the air, especially at night when humidity is higher. During the day, sunlight makes the vapor inside evaporate. That vapor then condenses on a glass surface and drips down through a tube, turning into drinkable water. The AWHW doesn’t rely on power sources like batteries or solar panels. It’s completely passive, meaning it works on its own. The team tested a meter-sized panel in Death Valley, California, one of the driest places in North America, and got between 57.0 and 161.5 milliliters of water per day even with humidity as low as 21 percent. That’s more than what other similar passive devices have managed. “We have built a meter-scale device that we hope to deploy in resource-limited regions, where even a solar cell is not very accessible,” said Xuanhe Zhao, a professor at MIT. “It’s a test of feasibility in scaling up this water harvesting technology. Now people can build it even larger, or make it into parallel panels, to supply drinking water to people and achieve real impact.” Another cool part of the design is how they kept the water safe to drink. Usually, these kinds of hydrogels use salts like lithium chloride to absorb more vapor but that can lead to salt leaking into the water, which isn’t ideal. To solve this, MIT’s team mixed in glycerol, a compound that helps keep salt locked inside the gel. In testing, the lithium ion concentration in the harvested water stayed below 0.06 ppm (parts per million), which is way below the safe limit. The hydrogel domes also give the material more surface area, letting it collect more vapor. The outer glass panel is coated with a special polymer film that helps cool the glass, making it easier for vapor to condense. “This is just a proof-of-concept design, and there are a lot of things we can optimize,” said lead author Chang Liu, now a professor at the National University of Singapore. “For instance, we could have a multipanel design. And we’re working on a next generation of the material to further improve its intrinsic properties.” Published in Nature Water, the study says the AWHW could last at least a year and shows promise for making safe, sustainable water in places with harsh climates. The researchers believe an array of vertical panels could one day supply water to individual households, especially in remote or off-grid locations. Source: MIT News, Nature This article was generated with some help from AI and reviewed by an editor. Under Section 107 of the Copyright Act 1976, this material is used for the purpose of news reporting. Fair use is a use permitted by copyright statute that might otherwise be infringing.
    • Clear Linux is open source, indeed, so its source code is available for anyone. They're just shutting down its support from them, they're not forbidding anyone else from taking over.
    • Linux Mint is also my favorite distro, but I fear what will happen with it if Clem were to disappear tomorrow, to be honest.
    • Yeah, I totally get your point, which is possible it could happen. I just hope there is a few people around him who are similar to where if they took over things would run pretty much the same. if not, then yeah, it could start to decline rapidly etc. but I figure something that's been around for a longer period of time with a decent backing, and probably more users than most Linux distro's (which I would 'imagine' Mint is one of the more used Linux desktop distro's by volume of people who use it), is less likely to just disappear. but like you said, nothing is guaranteed. but I do think you are probably right in that Clem is probably the core of what keeps Mint, Mint. I like how it tends to stay pretty much the same with some slight tweaks here and there (but is largely the same) instead of that crap some people go for with change for the sake of change trying to create a overly fancy interface and other unnecessary stuff etc. I also feel Mint keeps a nice balance of things out-of-the-box where it's not too bloated, nor too striped down. p.s. but I see Mint as a better Ubuntu basically. but I get your point like if it was more of a really serious choice of needing a 'safe bet' to use long term, then yeah something like official Ubuntu would be one of the better choices for sure given what you said with it being backed by an actual company which makes it a safer bet than Mint which is smaller and 'could' potentially be more fragile.
  • Recent Achievements

    • First Post
      leoniDAM earned a badge
      First Post
    • Reacting Well
      Ian_ earned a badge
      Reacting Well
    • One Month Later
      Ian_ earned a badge
      One Month Later
    • Dedicated
      MacDaddyAz earned a badge
      Dedicated
    • Explorer
      cekicen went up a rank
      Explorer
  • Popular Contributors

    1. 1
      +primortal
      506
    2. 2
      ATLien_0
      209
    3. 3
      Michael Scrip
      202
    4. 4
      Xenon
      145
    5. 5
      +FloatingFatMan
      121
  • Tell a friend

    Love Neowin? Tell a friend!