Archive for the ‘IIS’ Category.
16 September, 2006, 16:24
When you download the PHP installer, it fails to install for Windows Vista. So you have to install it manually. Just download the zip file and extract it somewhere that you can remember. Then you might want to manual installation instructions, but it won’t be correct for IIS7. Here is the guideline to install PHP to IIS7.
- Copy the php.ini to windows folder. enable the needed extensions by editing the file. Give rights for the file, to IUSR user, so that IIS can access the file.
- Run IIS Manager (inetmgr.exe)

-
For the main site, click to ISAPI Filters, right click to add or actions add to php ISAPI handler with the filter name that you want. Just point to php5isapi.dll file which is the isapi filter.

- Than come back to main site, and click to ISAPI and CGI Restrictions, and click add a restriction. For ISAPI and Cgi path select php5isapi.dll file and give a desired name for description. Also don’t forget to click “Allow extension path to execute”
- Make sure that after adding, php is allowed from the ISAPI and CGI Restrictions window.
- On ISAPI and CGI Restrictions page, right click to php and click to “Edit feature Settings”, from there you need to select both of them to enable php extensions to work, like mysql, mssql or ssl extensions specified in my.ini
- Go to main site again, and click for the “Handler Mappings”. Click to add “Script Map”. For the request path type *.php, executable is php5isapi.dll Name is Php
- It will ask for the script map to add, just click to yes.
- Our php and extensions should work now, but we might want to add index.php file to look for a folder. From the main window, we click to “Default Document” and add index.php to the end of list.
That’s all for php and extensions to work.
15 September, 2006, 03:40
I am a bit surprised when running ASP.NET 1.1 application on IIS7. You don’t have to install .Net framework 1.1. I also suspected that if .Net 1.1 comes pre-installed, but my GAC (Global Assembly Cache) have only 2.0 libraries.
Maybe I shouldn’t be surprised, according to IIS team this is because of the backward compatibility, but it might not be guaranteed. So if you happen to run your application (like me
) it is because of the backward compatibility of ASP.NET. At the end the application runs on ASP.NET 2.0 worker process.
C:\\Program Files\\Microsoft Visual Studio 8\\VC> gacutil /l System.Data
Microsoft (R) .NET Global Assembly Cache Utility. Version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
System.Data, Version= 2.0.0.0, Culture= neutral, PublicKeyToken= b77a5c561934e089
, processorArchitecture=x86
Number of items = 1
C:\Program Files\Microsoft Visual Studio 8\VC>
Running Web Application
All the code without change can work on IIS7. You can migrate your code to ASP.NET 2.0 but this is not a necessity. With a little configuration on IIS server you will be able to run your 1.1 compiled applications.
- After you open the IIS Manager (still inetmgr.exe), you either “Add Application” or ”Convert to Application” to create your web application. With “Add Application” you will be able to choose any directory in your computer, but with “Convert to Application” you will only be able to choose from the virtual directories which is located under inetpub\wwwroot.

- We see “Add Application” dialog box opened. From there we select Application Pool to change DefaultAppPool.

- We select Classic .Net AppPool from the “Select Application Pool” dialog.

- Then we’re ready to go after setting the application pool to Classic .Net AppPool
- When we click browse, or look directly to the virtual directory, our site is up and running
Debugging
One more thing, to debug your application you need to switch the application to windows authentication mode. This has also been changed in IIS7.
- In IIS Manager select from left, the web application virtual directory, then from right select authentication under IIS section.

- Then enable windows authentication to be able to debug your application.