source: www/manuals/PHP_manual/install.iis.html@ 1

Last change on this file since 1 was 1, checked in by george, 17 years ago

Prvotní import všeho

File size: 11.9 KB
Line 
1<HTML
2><HEAD
3><TITLE
4>Servers-IIS/PWS</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
8REL="HOME"
9TITLE="Manuál PHP"
10HREF="index.html"><LINK
11REL="UP"
12TITLE="Instalace"
13HREF="installation.html"><LINK
14REL="PREVIOUS"
15TITLE="Servers-fhttpd"
16HREF="install.fhttpd.html"><LINK
17REL="NEXT"
18TITLE="Servers-Netscape and iPlanet"
19HREF="install.netscape-enterprise.html"><META
20HTTP-EQUIV="Content-type"
21CONTENT="text/html; charset=ISO-8859-2"></HEAD
22><BODY
23CLASS="sect1"
24BGCOLOR="#FFFFFF"
25TEXT="#000000"
26LINK="#0000FF"
27VLINK="#840084"
28ALINK="#0000FF"
29><DIV
30CLASS="NAVHEADER"
31><TABLE
32SUMMARY="Header navigation table"
33WIDTH="100%"
34BORDER="0"
35CELLPADDING="0"
36CELLSPACING="0"
37><TR
38><TH
39COLSPAN="3"
40ALIGN="center"
41>Manuál PHP</TH
42></TR
43><TR
44><TD
45WIDTH="10%"
46ALIGN="left"
47VALIGN="bottom"
48><A
49HREF="install.fhttpd.html"
50ACCESSKEY="P"
51>Pøedcházející</A
52></TD
53><TD
54WIDTH="80%"
55ALIGN="center"
56VALIGN="bottom"
57>Kapitola 3. Instalace</TD
58><TD
59WIDTH="10%"
60ALIGN="right"
61VALIGN="bottom"
62><A
63HREF="install.netscape-enterprise.html"
64ACCESSKEY="N"
65>Dal¹í</A
66></TD
67></TR
68></TABLE
69><HR
70ALIGN="LEFT"
71WIDTH="100%"></DIV
72><DIV
73CLASS="sect1"
74><H1
75CLASS="sect1"
76><A
77NAME="install.iis"
78></A
79>Servers-IIS/PWS</H1
80><P
81>&#13; This section contains notes and hints specific to IIS (Microsoft
82 Internet Information Server). Installing PHP for
83 <A
84HREF="install.iis.html#install.iis.iis3"
85>PWS/IIS 3</A
86>,
87 <A
88HREF="install.iis.html#install.iis.pws4"
89>PWS 4 or newer</A
90> and
91 <A
92HREF="install.iis.html#install.iis.iis4"
93>IIS 4 or newer</A
94> versions.
95 </P
96><DIV
97CLASS="sect2"
98><H2
99CLASS="sect2"
100><A
101NAME="install.iis.iis3"
102></A
103>Windows and PWS/IIS 3</H2
104><P
105>&#13; The recommended method for configuring these servers is to use
106 the REG file included with the distribution
107 (pws-php4cgi.reg). You may want to edit this file and make sure
108 the extensions and PHP install directories match your
109 configuration. Or you can follow the steps below to do it
110 manually.
111 </P
112><DIV
113CLASS="warning"
114><P
115></P
116><TABLE
117CLASS="warning"
118BORDER="1"
119WIDTH="100%"
120><TR
121><TD
122ALIGN="CENTER"
123><B
124>Varování</B
125></TD
126></TR
127><TR
128><TD
129ALIGN="LEFT"
130><P
131>&#13; These steps involve working directly with the Windows
132 registry. One error here can leave your system in an unstable
133 state. We highly recommend that you back up your registry
134 first. The PHP Development team will not be held responsible if
135 you damage your registry.
136 </P
137></TD
138></TR
139></TABLE
140></DIV
141><P
142>&#13; <P
143></P
144><UL
145><LI
146><P
147>&#13; Run Regedit.
148 </P
149></LI
150><LI
151><P
152>&#13; Navigate to: <TT
153CLASS="literal"
154>HKEY_LOCAL_MACHINE /System
155 /CurrentControlSet /Services /W3Svc /Parameters
156 /ScriptMap</TT
157>.
158 </P
159></LI
160><LI
161><P
162>&#13; On the edit menu select: <TT
163CLASS="literal"
164>New-&#62;String Value</TT
165>.
166 </P
167></LI
168><LI
169><P
170>&#13; Type in the extension you wish to use for your php
171 scripts. For example <TT
172CLASS="literal"
173>.php</TT
174>
175 </P
176></LI
177><LI
178><P
179>&#13; Double click on the new string value and enter the path to
180 <TT
181CLASS="literal"
182>php.exe</TT
183> in the value data field. ex:
184 <TT
185CLASS="literal"
186>c:\php\php.exe</TT
187>.
188 </P
189></LI
190><LI
191><P
192>&#13; Repeat these steps for each extension you wish to associate
193 with PHP scripts.
194 </P
195></LI
196></UL
197>
198 </P
199><P
200>&#13; The following steps do not affect the web server installation
201 and only apply if you want your php scripts to be executed when
202 they are run from the command line (ex. run
203 <TT
204CLASS="filename"
205>c:\myscripts\test.php</TT
206>) or by double clicking
207 on them in a directory viewer window. You may wish to skip these
208 steps as you might prefer the PHP files to load into a text
209 editor when you double click on them.
210 </P
211><P
212>&#13; <P
213></P
214><UL
215><LI
216><P
217>&#13; Navigate to: <TT
218CLASS="literal"
219>HKEY_CLASSES_ROOT</TT
220>
221 </P
222></LI
223><LI
224><P
225>&#13; On the edit menu select: <TT
226CLASS="literal"
227>New-&#62;Key</TT
228>.
229 </P
230></LI
231><LI
232><P
233>&#13; Name the key to the extension you setup in the previous
234 section. ex: <TT
235CLASS="literal"
236>.php</TT
237>
238 </P
239></LI
240><LI
241><P
242>&#13; Highlight the new key and in the right side pane, double click
243 the "default value" and enter <TT
244CLASS="literal"
245>phpfile</TT
246>.
247 </P
248></LI
249><LI
250><P
251>&#13; Repeat the last step for each extension you set up in the
252 previous section.
253 </P
254></LI
255><LI
256><P
257>&#13; Now create another <TT
258CLASS="literal"
259>New-&#62;Key</TT
260> under
261 <TT
262CLASS="literal"
263>HKEY_CLASSES_ROOT</TT
264> and name it
265 <TT
266CLASS="literal"
267>phpfile</TT
268>.
269 </P
270></LI
271><LI
272><P
273>&#13; Highlight the new key <TT
274CLASS="literal"
275>phpfile</TT
276> and in the
277 right side pane, double click the "default value" and enter
278 <TT
279CLASS="literal"
280>PHP Script</TT
281>.
282 </P
283></LI
284><LI
285><P
286>&#13; Right click on the <TT
287CLASS="literal"
288>phpfile</TT
289> key and select
290 <TT
291CLASS="literal"
292>New-&#62;Key</TT
293>, name it <TT
294CLASS="literal"
295>Shell</TT
296>.
297 </P
298></LI
299><LI
300><P
301>&#13; Right click on the <TT
302CLASS="literal"
303>Shell</TT
304> key and select
305 <TT
306CLASS="literal"
307>New-&#62;Key</TT
308>, name it <TT
309CLASS="literal"
310>open</TT
311>.
312 </P
313></LI
314><LI
315><P
316>&#13; Right click on the <TT
317CLASS="literal"
318>open</TT
319> key and select
320 <TT
321CLASS="literal"
322>New-&#62;Key</TT
323>, name it
324 <TT
325CLASS="literal"
326>command</TT
327>.
328 </P
329></LI
330><LI
331><P
332>&#13; Highlight the new key <TT
333CLASS="literal"
334>command</TT
335> and in the
336 right side pane, double click the "default value" and enter
337 the path to <TT
338CLASS="literal"
339>php.exe</TT
340>. ex:
341 <TT
342CLASS="literal"
343>c:\php\php.exe -q %1</TT
344>. (don't forget the
345 <TT
346CLASS="literal"
347>%1</TT
348>).
349 </P
350></LI
351><LI
352><P
353>&#13; Exit Regedit.
354 </P
355></LI
356><LI
357><P
358>&#13; If using PWS on Windows, reboot to reload the registry.
359 </P
360></LI
361></UL
362>
363 </P
364><P
365>&#13; PWS and IIS 3 users now have a fully operational system. IIS 3
366 users can use a nifty <A
367HREF="http://www.genusa.com/iis/iiscfg.html"
368TARGET="_top"
369>tool</A
370>
371 from Steven Genusa to configure their script maps.
372 </P
373></DIV
374><DIV
375CLASS="sect2"
376><H2
377CLASS="sect2"
378><A
379NAME="install.iis.pws4"
380></A
381>Windows and PWS 4 or newer</H2
382><P
383>&#13; When installing PHP on Windows with PWS 4 or newer version,
384 you have two options. One to set up the PHP CGI binary,
385 the other is to use the ISAPI module DLL.
386 </P
387><P
388>&#13; If you choose the CGI binary, do the following:
389 <P
390></P
391><UL
392><LI
393><P
394>&#13; Edit the enclosed <TT
395CLASS="filename"
396>pws-php4cgi.reg</TT
397>
398 file (look into the SAPI dir) to reflect the location of
399 your php.exe. Forward slashes should be escaped, for example:
400 <TT
401CLASS="literal"
402>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\php.exe"</TT
403>
404 </P
405></LI
406><LI
407><P
408>&#13; In the PWS Manager, right click on a given directory you want
409 to add PHP support to, and select Properties. Check the 'Execute'
410 checkbox, and confirm.
411 </P
412></LI
413></UL
414>
415 </P
416><P
417>&#13; If you choose the ISAPI module, do the following:
418 <P
419></P
420><UL
421><LI
422><P
423>&#13; Edit the enclosed <TT
424CLASS="filename"
425>pws-php4isapi.reg</TT
426>
427 file (look into the SAPI dir) to reflect the location of
428 your php4isapi.dll. Forward slashes should be escaped, for example:
429 <TT
430CLASS="literal"
431>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\sapi\\php4isapi.dll"</TT
432>
433 </P
434></LI
435><LI
436><P
437>&#13; In the PWS Manager, right click on a given directory you want to
438 add PHP support to, and select Properties. Check the 'Execute'
439 checkbox, and confirm.
440 </P
441></LI
442></UL
443>
444 </P
445></DIV
446><DIV
447CLASS="sect2"
448><H2
449CLASS="sect2"
450><A
451NAME="install.iis.iis4"
452></A
453>Windows NT/2000/XP and IIS 4 or newer</H2
454><P
455>&#13; To install PHP on an NT/2000/XP Server running IIS 4 or newer,
456 follow these instructions. You have two options to set up
457 PHP, using the CGI binary (php.exe) or with the ISAPI module.
458 </P
459><P
460>&#13; In either case, you need to start the Microsoft Management
461 Console (may appear as 'Internet Services Manager', either
462 in your Windows NT 4.0 Option Pack branch or the Control
463 Panel=&#62;Administrative Tools under Windows 2000/XP). Then
464 right click on your Web server node (this will most probably
465 appear as 'Default Web Server'), and select 'Properties'.
466 </P
467><P
468>&#13; If you want to use the CGI binary, do the following:
469 <P
470></P
471><UL
472><LI
473><P
474>&#13; Under 'Home Directory', 'Virtual Directory', or
475 'Directory', click on the 'Configuration' button,
476 and then enter the App Mappings tab.
477 </P
478></LI
479><LI
480><P
481>&#13; Click Add, and in the Executable box, type:
482 <TT
483CLASS="literal"
484>c:\php\php.exe</TT
485> (assuming
486 that you have unziped PHP in c:\php\).
487 </P
488></LI
489><LI
490><P
491>&#13; In the Extension box, type the file name extension you want
492 associated with PHP scripts. Leave 'Method exclusions'
493 blank, and check the Script engine checkbox. You may also
494 like to check the 'check that file exists' box - for a small
495 performance penalty, IIS (or PWS) will check that the script
496 file exists and sort out authentication before firing up php.
497 This means that you will get sensible 404 style error messages
498 instead of cgi errors complaining that php did not output any data.
499 </P
500><P
501>&#13; You must start over from the previous step for each
502 extension you want associated with PHP scripts.
503 <TT
504CLASS="literal"
505>.php</TT
506> and <TT
507CLASS="literal"
508>.phtml</TT
509>
510 are common, although <TT
511CLASS="literal"
512>.php3</TT
513> may be
514 required for legacy applications.
515 </P
516></LI
517><LI
518><P
519>&#13; Set up the appropriate security. (This is done in Internet
520 Service Manager), and if your NT Server uses NTFS file system,
521 add execute rights for I_USR_ to the directory that contains
522 <TT
523CLASS="literal"
524>php.exe</TT
525>.
526 </P
527></LI
528></UL
529>
530 </P
531><P
532>&#13; To use the ISAPI module, do the following:
533 <P
534></P
535><UL
536><LI
537><P
538>&#13; If you don't want to perform HTTP Authentication using PHP,
539 you can (and should) skip this step. Under ISAPI Filters,
540 add a new ISAPI filter. Use PHP as the filter name, and
541 supply a path to the php4isapi.dll.
542 </P
543></LI
544><LI
545><P
546>&#13; Under 'Home Directory', click on the 'Configuration' button.
547 Add a new entry to the Application Mappings. Use the path
548 to the php4isapi.dll as the Executable, supply
549 <TT
550CLASS="literal"
551>.php</TT
552> as the extension, leave Method
553 exclusions blank, and check the Script engine checkbox.
554 </P
555></LI
556><LI
557><P
558>&#13; Stop IIS completely (NET STOP iisadmin)
559 </P
560></LI
561><LI
562><P
563>&#13; Start IIS again (NET START w3svc)
564 </P
565></LI
566></UL
567>
568 </P
569></DIV
570></DIV
571><DIV
572CLASS="NAVFOOTER"
573><HR
574ALIGN="LEFT"
575WIDTH="100%"><TABLE
576SUMMARY="Footer navigation table"
577WIDTH="100%"
578BORDER="0"
579CELLPADDING="0"
580CELLSPACING="0"
581><TR
582><TD
583WIDTH="33%"
584ALIGN="left"
585VALIGN="top"
586><A
587HREF="install.fhttpd.html"
588ACCESSKEY="P"
589>Pøedcházející</A
590></TD
591><TD
592WIDTH="34%"
593ALIGN="center"
594VALIGN="top"
595><A
596HREF="index.html"
597ACCESSKEY="H"
598>Domù</A
599></TD
600><TD
601WIDTH="33%"
602ALIGN="right"
603VALIGN="top"
604><A
605HREF="install.netscape-enterprise.html"
606ACCESSKEY="N"
607>Dal¹í</A
608></TD
609></TR
610><TR
611><TD
612WIDTH="33%"
613ALIGN="left"
614VALIGN="top"
615>Servers-fhttpd</TD
616><TD
617WIDTH="34%"
618ALIGN="center"
619VALIGN="top"
620><A
621HREF="installation.html"
622ACCESSKEY="U"
623>Nahoru</A
624></TD
625><TD
626WIDTH="33%"
627ALIGN="right"
628VALIGN="top"
629>Servers-Netscape and iPlanet</TD
630></TR
631></TABLE
632></DIV
633></BODY
634></HTML
635>
Note: See TracBrowser for help on using the repository browser.