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

    • Rufus alternative Ventoy now supports Windows 11's mandatory update, fixes major boot bug by Sayan Sen While Microsoft has its own official Media Creation Tool used for making bootable USB media, there are some popular third-party utilities as well which offer additional options like bypassing system requirements, Microsoft Account creation, and more. One of these is Ventoy, and the software has received its latest update today. In fact, the app actually got a slew of updates over the last couple of days, three version releases in total, to be specific. The first release, version 1.1.13, was pulled as there was some unspecified error in the update, and as such, the corrected version 1.1.14 was pushed out. Following that on very short notice, 1.1.15 was published as well. For those unfamiliar, Ventoy is an open-source utility that lets users create a bootable USB drive once and then simply copy ISO, WIM, IMG, VHD, or EFI files onto it without repeatedly formatting the drive. It supports both legacy BIOS and UEFI boot modes, Secure Boot, and a wide range of operating systems, making it one of the most versatile tools in the category. The biggest change in version 1.1.14 is an updated Secure Boot shim file aimed at resolving the UEFI CA 2023 issue, which is basically a compatibility problem that has affected Secure Boot environments on some systems. If you recall, we reported about severe boot issues on HP devices following the release of updated Secure Boot 2023 keys. For anyone who may not be aware, back in early 2024, Microsoft announced that it was updating Secure Boot keys as they were going to become 15 years old in 2026, which is also when they are set to expire. As such, the new 2023 certificates have been rolling out with the newest Windows 11 updates. Updated boot manager and Secure Boot certificates are crucial for protection against malware like bootkits. These are mandatory updates. Alongside that, the VentoyPlugson graphical plugin configurator was updated in sync with the release. The update also introduces a new VTOY_SECURE_BOOT_POLICY option within the Global Control plugin, giving users more flexibility in managing Secure Boot behavior. Ventoy has also received a fix for a startup issue when Secure Boot was disabled. Microsoft does officially allow users to boot systems without Secure Boot as long as the PC is Secure Boot capable. The full changelog is given below: Update secure boot shim file to solve the UEFI CA 2023 issue. The new release use a new CA, so you need to enroll the new key for the first boot time. VentoyPlugson update synchronously. Global control plugin add a VTOY_SECURE_BOOT_POLICY option. Fix the boot issue when Secure Boot is disabled in the UEFI firmware. You can download the latest version of the app here on Ventoy's official GitHub repo or from Neowin software stories.
    • Windows 11 is fine, no issues on any of the machines I've run it on since release. The stricter security requirements are a good thing, sometimes the baseline needs to change and people will winge, but it is what it is. Happened with the move from 9x to NT - broke compatability Happened with XP SP2 when security started to become a serious consideration Certainly happend with Vista that brought in UAC, the concept of not running as admin (something that has been the norm in Linux/Unix from pretty much the start) and a completely new driver stack. Windows 11 will probably get looked back at as the point where even consumer and SMB IT was dragged kicking and screaming into a somewhat secure by default configuration.
    • Bluestacks has been emulating Android on Windows for fifteen years. It's janky and riddled with ads though, so WSA looked like it was going to be a huge improvement over the emulator experience. Too bad Microsoft dropped the ball on that.
    • Classic. China would be nothing without Western, Japanese, and South Korean technology.
    • The world is larger then your small viewpoint. Plenty of scientists care about this, especially those involved in space.
  • Recent Achievements

    • 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
    • Dedicated
      Scoobystu earned a badge
      Dedicated
    • First Post
      Tom Schmidt earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      441
    2. 2
      +Edouard
      172
    3. 3
      PsYcHoKiLLa
      134
    4. 4
      Michael Scrip
      78
    5. 5
      Xenon
      77
  • Tell a friend

    Love Neowin? Tell a friend!