|
1 | 1 | <?xml version="1.0" encoding="utf-8"?>
|
2 | 2 | <!-- $Revision$ -->
|
3 |
| -<!-- EN-Revision: 8e732e84a1425cf0ab3a5b0da8fe113c7a6da85e Maintainer: takagi Status: ready --> |
| 3 | +<!-- EN-Revision: 42b7ea093412486fa88b7270a397abb008218163 Maintainer: takagi Status: ready --> |
4 | 4 | <!-- Credits: mumumu -->
|
5 | 5 | <sect1 xml:id="install.windows.manual" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
6 |
| - <title>Windows 上での PHP の手動インストール</title> |
7 |
| - <sect2> |
8 |
| - <title>ウェブサーバーの選択</title> |
9 |
| - <sect3> |
10 |
| - <title>IIS</title> |
11 |
| - <para> |
12 |
| - IIS は Windows に標準で組み込まれています。 |
13 |
| - Windows サーバーの場合は、サーバーマネージャーを使って IIS ロールを追加します。CGI ロールを含める必要があります。 |
14 |
| - Windows デスクトップの場合は、コントロールパネルの「プログラムの追加と削除」を使って IIS を追加します。 |
15 |
| - Microsoft のドキュメントに <link xlink:href="https://docs.microsoft.com/en-us/previous-versions/ms181052(v=vs.80)">詳細な手順があります</link>。 |
16 |
| - デスクトップウェブアプリケーションやウェブ開発の場合は、IIS/Express や PHP Desktop も使えます。 |
| 6 | + <title>ビルド済みバイナリの手動インストール</title> |
17 | 7 |
|
18 |
| - <example> |
19 |
| - <title>IIS と PHP の設定をするためのコマンドライン</title> |
20 |
| - <programlisting> |
21 |
| -<![CDATA[ |
| 8 | + <simplesect xml:id="install.windows.requirements" annotations="chunk:false"> |
| 9 | + <title>インストールに必要なもの</title> |
| 10 | + <simpara> |
| 11 | + PHP は 32bit x86 または 64bit x64 システムでだけ利用できます。 |
| 12 | + そして、現状では ARM で動作する Windows RT では利用できません。 |
| 13 | + PHP 8.3.0 以降では、Windows 8 または Windows Server 2012 が必要です。 |
| 14 | + PHP 7.2.0 以降では、Windows 7 または Windows Server 2008 R2 が必要です。 |
| 15 | + PHP 7.2.0 より前のバージョンでは、Windows 2008 や Vista がサポートしていました。 |
| 16 | + </simpara> |
22 | 17 |
|
23 |
| -@echo off |
| 18 | + <simpara> |
| 19 | + PHP は Visual C runtime(CRT) を必要とします。 |
| 20 | + 他の多くのアプリケーションも CRT を必要としているので、 |
| 21 | + CRT は既にインストールされていそうではあります。 |
| 22 | + しかし、仮にインストールされていない場合は |
| 23 | + Microsoft Visual C++ Redistributable for Visual Studio 2022 |
| 24 | + が全ての PHP バージョンに適合しており、 |
| 25 | + <link xlink:href="&url.microsoft.visualc.redistr;">Microsoft のページ</link> |
| 26 | + からダウンロードできます。 |
| 27 | + </simpara> |
24 | 28 |
|
25 |
| -REM download .ZIP file of PHP build from http://windows.php.net/downloads/ |
| 29 | + <simpara> |
| 30 | + x86 版の PHP をビルドするには、x86 版の CRT が必要ですし、 |
| 31 | + x64 版の PHP をビルドするには、x64 版の CRT が必要です。 |
| 32 | + CRT が既にインストールされている場合は、 |
| 33 | + インストーラーは「既にインストールされている」旨を表示し、 |
| 34 | + システムを何も変更しません。 |
| 35 | + CRT のインストーラーは <option>/quiet</option> と |
| 36 | + <option>/norestart</option> コマンドラインオプションをサポートしているので、 |
| 37 | + インストール自体はスクリプトで自動化できます。 |
| 38 | + </simpara> |
| 39 | + </simplesect> |
26 | 40 |
|
27 |
| -REM path to directory you decompressed PHP .ZIP file into (no trailing \) |
28 |
| -set phppath=c:\php |
| 41 | + <simplesect> |
| 42 | + <title>どこから PHP バイナリをダウンロードするか</title> |
| 43 | + <simpara> |
| 44 | + Windows 向けのビルドは |
| 45 | + <link xlink:href="&url.php.win.downloads;">PHP Windows website</link> |
| 46 | + からダウンロードできます。 |
| 47 | + 全てのバイナリは最適化(<abbrev>PGO</abbrev>)されており、 |
| 48 | + QA が通されています。 |
| 49 | + そして、GA リリースは十分にテストされています。 |
| 50 | + </simpara> |
| 51 | + </simplesect> |
29 | 52 |
|
30 |
| -
|
31 |
| -REM Clear current PHP handlers |
32 |
| -%windir%\system32\inetsrv\appcmd clear config /section:system.webServer/fastCGI |
33 |
| -REM The following command will generate an error message if PHP is not installed. This can be ignored. |
34 |
| -%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /-[name='PHP_via_FastCGI'] |
35 |
| -
|
36 |
| -REM Set up the PHP handler |
37 |
| -%windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+[fullPath='%phppath%\php-cgi.exe'] |
38 |
| -%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='%phppath%\php-cgi.exe',resourceType='Unspecified'] |
39 |
| -%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /accessPolicy:Read,Script |
40 |
| -
|
41 |
| -REM Configure FastCGI Variables |
42 |
| -%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='%phppath%\php-cgi.exe'].instanceMaxRequests:10000 |
43 |
| -%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHP_FCGI_MAX_REQUESTS',value='10000']" |
44 |
| -%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHPRC',value='%phppath%\php.ini']" |
45 |
| -]]> |
46 |
| - </programlisting> |
47 |
| - </example> |
48 |
| - </para> |
49 |
| - </sect3> |
50 |
| - |
51 |
| - <sect3> |
52 |
| - <title>Apache</title> |
53 |
| - <para> |
54 |
| - Windows 用の Apache2 のビルドには、いくつかの種類があります。 |
55 |
| - |
56 |
| - ApacheLounge がおすすめですが、それ以外にも XAMPP や WampServer や BitNami といったものがあり、これらはインストーラがついています。 |
57 |
| - |
58 |
| - Apache で PHP を使うには、mod_php あるいは mod_fastcgi を用います。 |
59 |
| - |
60 |
| - mod_php を使う場合は、スレッドセーフ版の Apache を使う必要があります。また、同じバージョンの Visual C、同じ CPU (x86 あるいは x64) のビルドでなければいけません。 |
61 |
| - </para> |
62 |
| - </sect3> |
63 |
| - </sect2> |
64 |
| - |
65 |
| - <sect2> |
66 |
| - <title>ビルド方法の選択</title> |
| 53 | + <simplesect xml:id="install.windows.pecl" annotations="chunk:false"> |
| 54 | + <title>ビルド済みのPECL拡張モジュール</title> |
67 | 55 | <para>
|
68 |
| - Windows 向けのビルドは <link xlink:href="http://windows.php.net/download/">http://windows.php.net/download/</link> からダウンロードできます。 |
69 |
| - |
70 |
| - 全てのビルドは最適化(<abbrev>PGO</abbrev>) されており、 QA や GA リリースで数多くのテストがなされています。 |
| 56 | + Windows 版のビルド済みPECL拡張モジュールは、 |
| 57 | + 拡張モジュールのPECLページで DLL として配布されています。 |
71 | 58 | </para>
|
72 | 59 | <para>
|
73 |
| - PHP には四種類のビルドがあります。 |
| 60 | + Unix のような、Windows 以外のシステムに特有の機能を使っていたり、 |
| 61 | + Windows で利用できないライブラリに依存していたりする拡張モジュールは、 |
| 62 | + Windows でバイナリは利用できません。 |
| 63 | + </para> |
| 64 | + </simplesect> |
| 65 | + |
| 66 | + <simplesect> |
| 67 | + <title>Build types</title> |
| 68 | + <para> |
| 69 | + PHP のビルドには以下の4種類があります: |
74 | 70 | <itemizedlist spacing="compact">
|
75 | 71 | <listitem>
|
76 | 72 | <para>Thread-Safe(TS) - Apache と mod_php のような、シングルプロセスのウェブサービス用</para>
|
77 | 73 | </listitem>
|
78 | 74 | <listitem>
|
79 |
| - <para>Non-Thread-Safe(NTS) - IIS やその他の FastCGI ウェブサーバー (Apache と mod_fastcgi など) 用。また、コマンドラインのスクリプト用にもおすすめ。</para> |
| 75 | + <para>Non-Thread-Safe(NTS) - IIS やその他の FastCGI ウェブサーバー (Apache と mod_fastcgi など) 用。コマンドラインのスクリプト用にもおすすめ。</para> |
80 | 76 | </listitem>
|
81 | 77 | <listitem>
|
82 |
| - <para>x86 - 32ビット版向け</para> |
| 78 | + <para>x86 - 32-bit システム向け</para> |
83 | 79 | </listitem>
|
84 | 80 | <listitem>
|
85 |
| - <para>x64 - 64ビット版向け</para> |
| 81 | + <para>x64 - 64-bit システム向け</para> |
86 | 82 | </listitem>
|
87 | 83 | </itemizedlist>
|
88 | 84 | </para>
|
89 |
| - </sect2> |
| 85 | + </simplesect> |
90 | 86 | </sect1>
|
91 | 87 | <!-- Keep this comment at the end of the file
|
92 | 88 | Local variables:
|
|
0 commit comments