Skip to content

Commit 8e96dcf

Browse files
committed
[install/windows/*.xml] sync with en
1 parent 4f2e286 commit 8e96dcf

File tree

6 files changed

+176
-99
lines changed

6 files changed

+176
-99
lines changed

install/windows/building.xml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 53afbdaf791ddbc4455672122573644f3f0d7949 Maintainer: haruki Status: ready -->
3+
<!-- EN-Revision: 2dbf3d9064d4cb07f0a2f7d06641c877a2e5ed24 Maintainer: haruki Status: ready -->
44
<!-- CREDITS: fujimoto,hirokawa,yuw,haruki,takagi -->
55
<sect1 xml:id="install.windows.building" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
66
<title>ソースからのビルド</title>
7-
<para>
8-
この章では、Windows 上でマイクロソフトのツールを用いて PHP をソースから
9-
コンパイルする方法を説明します。PHP を cygwin でコンパイルする場合は
10-
<xref linkend="install.unix"/> を参照ください。
11-
</para>
12-
<para>
13-
Wiki のドキュメント
14-
<link xlink:href="&url.wiki.windows.build.howto;">&url.wiki.windows.build.howto;</link>
15-
を参照ください。
16-
</para>
7+
8+
<simpara>
9+
Visual Studio を使ってビルドするには、
10+
<link xlink:href="&url.install.windows.stepbystep;">step-by-step
11+
build instructions</link> を参照ください。
12+
</simpara>
1713
</sect1>
1814

1915
<!-- Keep this comment at the end of the file

install/windows/commandline.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 8e732e84a1425cf0ab3a5b0da8fe113c7a6da85e Maintainer: mumumu Status: ready -->
3+
<!-- EN-Revision: 2dbf3d9064d4cb07f0a2f7d06641c877a2e5ed24 Maintainer: mumumu Status: ready -->
44

55
<sect1 xml:id="install.windows.commandline" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
6-
<title>Microsoft Windows のコマンドラインでの PHP</title>
6+
<title>Windows PHP をコマンドラインで動かす</title>
77
<para>
88
この節では、PHP を Windows のコマンドラインで実行するときの注意点やヒントを説明します。
99
</para>

install/windows/iis.xml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<!-- EN-Revision: e8ac70bf549a723cb36465667a6109d9933b8619 Maintainer: mumumu Status: ready -->
4+
<sect1 xml:id="install.windows.iis" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5+
<title>Windows の IIS と一緒にインストール</title>
6+
7+
<simplesect>
8+
<title>IIS のインストール</title>
9+
<simpara>
10+
Internet Information Services (IIS) は、
11+
Windows に標準で組み込まれています。
12+
Windows サーバーの場合は、
13+
サーバーマネージャーを使って IIS ロールを追加します。
14+
CGI ロールを含める必要があります。
15+
Windows デスクトップの場合は、
16+
コントロールパネルの「プログラムの追加と削除」を使って IIS を追加します。
17+
Microsoft のドキュメントに <link xlink:href="&url.iis.enable;">詳細な手順があります</link>。
18+
デスクトップウェブアプリケーションやウェブ開発の場合は、IIS/Express や PHP Desktop も使えます。
19+
</simpara>
20+
<note>
21+
<simpara>
22+
IIS と一緒に FastCGI ハンドラを使えば、
23+
Non-Thread Safe (NTS) 版の PHP のビルドがインストールされるはずです。
24+
</simpara>
25+
</note>
26+
</simplesect>
27+
<simplesect>
28+
<title>IIS と PHP を設定する</title>
29+
30+
<simpara>
31+
IIS マネージャー内で、FastCGI モジュールをインストールし、
32+
<literal>.php</literal> のハンドラマッピングを
33+
<filename>php-cgi.exe</filename> に対して追加します。
34+
(<filename>php.exe</filename> ではありません)
35+
</simpara>
36+
37+
<simpara>
38+
IIS の設定をスクリプト化するには、
39+
<command>APPCMD</command> コマンドラインツールが使えます。
40+
</simpara>
41+
</simplesect>
42+
<simplesect>
43+
<title>サンプルのバッチスクリプト</title>
44+
<example>
45+
<title>IIS と PHP の設定をするためのコマンドライン</title>
46+
<programlisting>
47+
<![CDATA[
48+
49+
@echo off
50+
51+
REM download .ZIP file of PHP build from http://windows.php.net/downloads/
52+
53+
REM path to directory into which PHP .ZIP file was decompressed (no trailing \)
54+
set phppath=c:\php
55+
56+
57+
REM Clear current PHP handlers
58+
%windir%\system32\inetsrv\appcmd clear config /section:system.webServer/fastCGI
59+
REM The following command will generate an error message if PHP is not installed. This can be ignored.
60+
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /-[name='PHP_via_FastCGI']
61+
62+
REM Set up the PHP handler
63+
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+[fullPath='%phppath%\php-cgi.exe']
64+
%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']
65+
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers /accessPolicy:Read,Script
66+
67+
REM Configure FastCGI Variables
68+
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath='%phppath%\php-cgi.exe'].instanceMaxRequests:10000
69+
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHP_FCGI_MAX_REQUESTS',value='10000']"
70+
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%phppath%\php-cgi.exe'].environmentVariables.[name='PHPRC',value='%phppath%\php.ini']"
71+
]]>
72+
</programlisting>
73+
</example>
74+
</simplesect>
75+
</sect1>
76+
<!-- Keep this comment at the end of the file
77+
Local variables:
78+
mode: sgml
79+
sgml-omittag:t
80+
sgml-shorttag:t
81+
sgml-minimize-attributes:nil
82+
sgml-always-quote-attributes:t
83+
sgml-indent-step:1
84+
sgml-indent-data:t
85+
indent-tabs-mode:nil
86+
sgml-parent-document:nil
87+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
88+
sgml-exposed-tags:nil
89+
sgml-local-catalogs:nil
90+
sgml-local-ecat-files:nil
91+
End:
92+
vim600: syn=xml fen fdm=syntax fdl=2 si
93+
vim: et tw=78 syn=sgml
94+
vi: ts=1 sw=1
95+
-->

install/windows/manual.xml

Lines changed: 61 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,88 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 8e732e84a1425cf0ab3a5b0da8fe113c7a6da85e Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: 42b7ea093412486fa88b7270a397abb008218163 Maintainer: takagi Status: ready -->
44
<!-- Credits: mumumu -->
55
<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>
177

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>
2217

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>
2428

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>
2640

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>
2952

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>
6755
<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 として配布されています。
7158
</para>
7259
<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種類があります:
7470
<itemizedlist spacing="compact">
7571
<listitem>
7672
<para>Thread-Safe(TS) - Apache と mod_php のような、シングルプロセスのウェブサービス用</para>
7773
</listitem>
7874
<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>
8076
</listitem>
8177
<listitem>
82-
<para>x86 - 32ビット版向け</para>
78+
<para>x86 - 32-bit システム向け</para>
8379
</listitem>
8480
<listitem>
85-
<para>x64 - 64ビット版向け</para>
81+
<para>x64 - 64-bit システム向け</para>
8682
</listitem>
8783
</itemizedlist>
8884
</para>
89-
</sect2>
85+
</simplesect>
9086
</sect1>
9187
<!-- Keep this comment at the end of the file
9288
Local variables:

install/windows/recommended.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 671a3705f5eec54979176ffdd09e61580e2f7d0a Maintainer: mumumu Status: ready -->
3+
<!-- EN-Revision: e8ac70bf549a723cb36465667a6109d9933b8619 Maintainer: mumumu Status: ready -->
44

55
<sect1 xml:id="install.windows.recommended" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
66
<title>Windows でのおすすめの構成</title>
@@ -51,7 +51,7 @@ opcache.enable_cli=On
5151
ハイパフォーマンスを求めるなら、
5252
アプリケーション内でオブジェクトキャッシュを利用すべきです。
5353

54-
<link xlink:href="http://pecl.php.net/package/WinCache">http://pecl.php.net/package/WinCache</link> から
54+
<link xlink:href="&url.pecl.package;WinCache">&url.pecl.package;WinCache</link> から
5555
WinCache DLL (あるいは <filename>WINCACHE_<replaceable>*</replaceable>.tgz</filename>) をダウンロードして、
5656
PHP の 拡張モジュール用ディレクトリ(<filename>php.ini</filename> の <link linkend="ini.extension-dir">extension_dir</link>) に配置しましょう。
5757

install/windows/tools.xml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: c55dde8f549a2f939adfd924fe6e6d242c7754d3 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: e8ac70bf549a723cb36465667a6109d9933b8619 Maintainer: takagi Status: ready -->
44
<!-- Credits: mumumu -->
5-
65
<sect1 xml:id="install.windows.tools" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
7-
<title>Windows 上での PHP インストーラ</title>
8-
<sect2>
9-
<title>PHP インストールツール</title>
10-
<para>
11-
<link xlink:href="https://www.apachefriends.org/index.html">XAMPP</link> や、
12-
WampServer や BitNami などを使えば、
13-
Windows 上で Apache を使う場合の PHP アプリケーションをセットアップできます。
14-
</para>
15-
16-
<para>
17-
Nginx を Windows でセットアップする場合は、
18-
少し多くの設定が必要です。
19-
セットアップに関して追加のヘルプが必要な場合は、
20-
<link xlink:href="https://www.nginx.com/resources/wiki/start/topics/examples/phpfastcgionwindows/">Nginx のドキュメント</link>
21-
を参照ください。
22-
</para>
23-
</sect2>
6+
<title>PHP をインストールするためのサードパーティーツール</title>
7+
&warn.install.third-party-support;
8+
<para>
9+
<link xlink:href="&url.xampp;">XAMPP</link>,
10+
<link xlink:href="&url.wampserver;">WampServer</link>,
11+
<link xlink:href="&url.bitnami;">Bitnami</link> を使えば、
12+
Windows 上で Apache を使う場合の PHP アプリケーションをセットアップできます。
13+
</para>
2414
</sect1>
2515
<!-- Keep this comment at the end of the file
2616
Local variables:

0 commit comments

Comments
 (0)