install/windows/apache2.xml
2871f7103c7cfcfd95db64eb0930085965fd9330
...
...
@@ -1,13 +1,14 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
+
<!-- $Revision$ -->
2
3
<sect1 xml:id="install.windows.apache2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
3
-
<title>Apache 2.x on Microsoft Windows</title>
4
+
<title>Installation for Apache 2.x on Windows systems</title>
4
5
<para>
5
6
This section contains notes and hints specific to Apache 2.x installs
6
7
of PHP on Microsoft Windows systems.
7
8
</para>
8
9
<note>
9
10
<para>
10
-
You should read the <link linkend="install.windows.manual">manual
11
+
Please read the <link linkend="install.windows.manual">manual
11
12
installation steps</link> first!
12
13
</para>
13
14
</note>
...
...
@@ -38,16 +39,24 @@
38
39

39
40
<sect2 xml:id="install.windows.apache2.module">
40
41
<title>Installing as an Apache handler</title>
42
+
<note>
43
+
<simpara>
44
+
When using the apache2handler SAPI, the Thread Safe (TS) version of
45
+
PHP must be used.
46
+
</simpara>
47
+
</note>
41
48
<para>
42
-
To load the PHP module for Apache 2.x the following lines in the
49
+
To load the PHP module for Apache 2.x, the following lines in the
43
50
Apache &httpd.conf; configuration file must be inserted:
44
51
<example>
45
52
<title>PHP and Apache 2.x as handler</title>
46
53
<programlisting role="apache-conf">
47
54
<![CDATA[
48
-
#
49
-
LoadModule php8_module "c:/php/php8apache2_4.dll"
50
-
AddHandler application/x-httpd-php .php
55
+
# before PHP 8.0.0 the name of the module was php7_module
56
+
LoadModule php_module "c:/php/php8apache2_4.dll"
57
+
<FilesMatch \.php$>
58
+
SetHandler application/x-httpd-php
59
+
</FilesMatch>
51
60
# configure the path to php.ini
52
61
PHPIniDir "C:/php"
53
62
]]>
...
...
@@ -56,31 +65,13 @@ PHPIniDir "C:/php"
56
65
</para>
57
66
<note>
58
67
<simpara>
59
-
Remember, the actual path to PHP on must be substituted instead of
68
+
The actual path to PHP must be substituted instead of
60
69
<filename>C:/php/</filename> in the above examples.
61
-
Take care that the file referenced in the LoadModule directive is at
62
-
the specified location, and to use <filename>php7apache2_4.dll</filename>
70
+
Make sure that the file referenced in the <literal>LoadModule</literal> directive is at
71
+
the specified location. Use <filename>php7apache2_4.dll</filename>
63
72
for PHP 7, or <filename>php8apache2_4.dll</filename> for PHP 8.
64
73
</simpara>
65
74
</note>
66
-
<para>
67
-
The above configuration will enable PHP handling of any file that has a
68
-
.php extension, even if there are other file extensions. For example, a
69
-
file named <filename>example.php.txt</filename> will be executed by the
70
-
PHP handler. To ensure that only files that <emphasis>end in</emphasis>
71
-
<filename>.php</filename> are executed, use the following configuration
72
-
instead:
73
-
</para>
74
-

75
-
<example>
76
-
<programlisting role="apache-conf">
77
-
<![CDATA[
78
-
<FilesMatch \.php$>
79
-
SetHandler application/x-httpd-php
80
-
</FilesMatch>
81
-
]]>
82
-
</programlisting>
83
-
</example>
84
75
</sect2>
85
76

86
77
<sect2 xml:id="install.windows.apache2.cgi">
...
...
@@ -130,23 +121,25 @@ PHPIniDir "C:/php"
130
121
Install the module according to the instructions that will come with it.
131
122
</para>
132
123
<para>
133
-
Configure your web server as shown below, taking care to adjust any paths
134
-
to reflect your how you have installed things on your particular system:
124
+
Configure the web server as shown below, taking care to adjust any paths
125
+
to reflect how it is installed on the system:
135
126

136
127
<example>
137
128
<title>Configure Apache to run PHP as FastCGI</title>
138
129
<programlisting>
139
130
<![CDATA[
140
131
LoadModule fcgid_module modules/mod_fcgid.so
141
-
# Where is your php.ini file?
132
+
# Where is the php.ini file?
142
133
FcgidInitialEnv PHPRC "c:/php"
143
-
AddHandler fcgid-script .php
134
+
<FilesMatch \.php$>
135
+
SetHandler fcgid-script
136
+
</FilesMatch>
144
137
FcgidWrapper "c:/php/php-cgi.exe" .php
145
138
]]>
146
139
</programlisting>
147
140
</example>
148
141

149
-
Files with a .php extension will now be executed by the PHP FastCGI
142
+
Files with a <literal>.php</literal> extension will now be executed by the PHP FastCGI
150
143
wrapper.
151
144
</para>
152
145
</sect2>
153
146