| 8 | |
| 9 | == IIS 7.x == |
| 10 | |
| 11 | ==== Install IIS 7.x to Windows 7 or Windows 2008 Server ==== |
| 12 | |
| 13 | By default, IIS 7 is not turned on under either Windows 7 or Windows 2008 Server. |
| 14 | |
| 15 | How IIS feature is turned on under Windows XP/7 or Windows Server is different. |
| 16 | |
| 17 | To turn on this feature under windows 7, go to Control Panel->Programs->Turn Windows Features On or Off, in the poped up Windows Features, expand Internet Information Services, check WWW Services, click OK to install the selected features. |
| 18 | |
| 19 | Under Windows 2008 Server, go to Control Panel->Administrative Tools->Server Manager, in the left panel, select Role, in the right panel, click Add Roles->Server Roles->Web Server(IIS), click OK to add the selected Role, then in the left panel, select Feature, in the right panel, click Add Features, a window with available windows features should open. Find Web Server (IIS) Tools and check it, click OK to install this feature. |
| 20 | |
| 21 | ==== Create registry key '''!IniFilePath'''. ==== |
| 22 | |
| 23 | To configure IIS with PHP, IIS needs to know where "php.ini" is. IIS gets to know the location of this file through a registry entry, which is HKEY_LOCAL_MACHINE->SOFTWARE->PHP->!IniFilePath with string value '''c:\php\''', suppose PHP is installed under c:\php. If PHP is installed with Windows installer, the registry entry is created automatically, otherwise, this key needs to created manually. |
| 24 | |
| 25 | ==== Open IIS Manager by going to Control Panel->Administrative Tools->IIS Manager ==== |
| 26 | |
| 27 | '''''Note: We won't explain how to open GUI for the following actions here as it might be different under various windows versions, here we only list the values of the fields in GUI''''' |
| 28 | |
| 29 | 1. Create Application Pool. |
| 30 | {{{ |
| 31 | Name: MapGuideAppPool |
| 32 | .NET Framework Version: (what ever version available in the drop down list) |
| 33 | Pipeline Mode: Integrated |
| 34 | Start Application Pool Immediately: true |
| 35 | }}} |
| 36 | 2. IIS configuration has several levels, the topmost levle is Server(or Host), then Sites, Virtual Directory, Applications. The configuration of lower level can inherate from its parent level. For this reason, we only configure Server level. In the left panel, select what every your machine name is, there should be a list of configuration categories in the right panel. The minimum configurations are Handler Mapping, ISAPI and CGI Restrictions |
| 37 | |
| 38 | 3. Handler Mapping->Add Module Mappings, add the following module mappings |
| 39 | * FastCGIModule |
| 40 | {{{ |
| 41 | requiest path: *.php |
| 42 | module: FastCGIModule |
| 43 | executable: C:\php\php.exe |
| 44 | Name: PHP <version> |
| 45 | }}} |
| 46 | * ISAPIModule |
| 47 | {{{ |
| 48 | request path: *.php |
| 49 | module: IsapiModule |
| 50 | executable: c:\php\php5isapi.dll |
| 51 | name: PHP ISAPI Handler |
| 52 | }}} |
| 53 | 4. ISAPI and CGI Restrictions. Add the following restrictions: |
| 54 | * Map Agent ISAPI Handler |
| 55 | {{{ |
| 56 | ISAPI or CGI Path: c:\mapguide-2.2-beta1\Web\www\mapagent\isapi_MapAgent.dll |
| 57 | Description: MapGuide MapAgent ISAPI Handler |
| 58 | Allow Extension Path To Execute: True |
| 59 | }}} |
| 60 | * PHP ISAPI Handler |
| 61 | {{{ |
| 62 | ISAPI or CGI Path: c:\php\php5isapi.dll |
| 63 | Description: PHP ISAPI Handler |
| 64 | Allow Extension Path To Execute: True |
| 65 | }}} |
| 66 | |
| 67 | 5. Add Applications to Default Web Site. Right-click Default Web Site->Add Application |
| 68 | {{{ |
| 69 | Alias: mapguide |
| 70 | Application Pool: MapGuideAppPool |
| 71 | Physical Path: c:\mapguide-2.2-beta1\Web\www |
| 72 | }}} |
| 73 | |
| 74 | '''Note:''' Some binary PHP installer may not have '''php5isapi.dll''', you can always find a compatible one for your PHP from the internet. [http://www.anindya.com/php-5-3-3-x64-64-bit-for-windows/ Here] is a place to get this file for PHP 5.3.x-x64 |
86 | | == IIS 7.x == |
87 | | |
88 | | ==== Install IIS 7.x to Windows 7 or Windows 2008 Server ==== |
89 | | |
90 | | By default, IIS 7 is not turned on under either Windows 7 or Windows 2008 Server. |
91 | | |
92 | | How IIS feature is turned on under Windows XP/7 or Windows Server is different. |
93 | | |
94 | | To turn on this feature under windows 7, go to Control Panel->Programs->Turn Windows Features On or Off, in the poped up Windows Features, expand Internet Information Services, check WWW Services, click OK to install the selected features. |
95 | | |
96 | | Under Windows 2008 Server, go to Control Panel->Administrative Tools->Server Manager, in the left panel, select Role, in the right panel, click Add Roles->Server Roles->Web Server(IIS), click OK to add the selected Role, then in the left panel, select Feature, in the right panel, click Add Features, a window with available windows features should open. Find Web Server (IIS) Tools and check it, click OK to install this feature. |
97 | | |
98 | | ==== Create registry key '''!IniFilePath'''. ==== |
99 | | |
100 | | To configure IIS with PHP, IIS needs to know where "php.ini" is. IIS gets to know the location of this file through a registry entry, which is HKEY_LOCAL_MACHINE->SOFTWARE->PHP->!IniFilePath with string value '''c:\php\''', suppose PHP is installed under c:\php. If PHP is installed with Windows installer, the registry entry is created automatically, otherwise, this key needs to created manually. |
101 | | |
102 | | ==== Open IIS Manager by going to Control Panel->Administrative Tools->IIS Manager ==== |
103 | | |
104 | | '''''Note: We won't explain how to open GUI for the following actions here as it might be different under various windows versions, here we only list the values of the fields in GUI''''' |
105 | | |
106 | | 1. Create Application Pool. |
107 | | {{{ |
108 | | Name: MapGuideAppPool |
109 | | .NET Framework Version: (what ever version available in the drop down list) |
110 | | Pipeline Mode: Integrated |
111 | | Start Application Pool Immediately: true |
112 | | }}} |
113 | | 2. IIS configuration has several levels, the topmost levle is Server(or Host), then Sites, Virtual Directory, Applications. The configuration of lower level can inherate from its parent level. For this reason, we only configure Server level. In the left panel, select what every your machine name is, there should be a list of configuration categories in the right panel. The minimum configurations are Handler Mapping, ISAPI and CGI Restrictions |
114 | | |
115 | | 3. Handler Mapping->Add Module Mappings, add the following module mappings |
116 | | * FastCGIModule |
117 | | {{{ |
118 | | requiest path: *.php |
119 | | module: FastCGIModule |
120 | | executable: C:\php\php.exe |
121 | | Name: PHP <version> |
122 | | }}} |
123 | | * ISAPIModule |
124 | | {{{ |
125 | | request path: *.php |
126 | | module: IsapiModule |
127 | | executable: c:\php\php5isapi.dll |
128 | | name: PHP ISAPI Handler |
129 | | }}} |
130 | | 4. ISAPI and CGI Restrictions. Add the following restrictions: |
131 | | * Map Agent ISAPI Handler |
132 | | {{{ |
133 | | ISAPI or CGI Path: c:\mapguide-2.2-beta1\Web\www\mapagent\isapi_MapAgent.dll |
134 | | Description: MapGuide MapAgent ISAPI Handler |
135 | | Allow Extension Path To Execute: True |
136 | | }}} |
137 | | * PHP ISAPI Handler |
138 | | {{{ |
139 | | ISAPI or CGI Path: c:\php\php5isapi.dll |
140 | | Description: PHP ISAPI Handler |
141 | | Allow Extension Path To Execute: True |
142 | | }}} |
143 | | |
144 | | 5. Add Applications to Default Web Site. Right-click Default Web Site->Add Application |
145 | | {{{ |
146 | | Alias: mapguide |
147 | | Application Pool: MapGuideAppPool |
148 | | Physical Path: c:\mapguide-2.2-beta1\Web\www |
149 | | }}} |
150 | | |
151 | | '''Note:''' Some binary PHP installer may not have '''php5isapi.dll''', you can always find a compatible one for your PHP from the internet. [http://www.anindya.com/php-5-3-3-x64-64-bit-for-windows/ Here] is a place to get this file for PHP 5.3.x-x64 |
152 | | |