install/windows/apache2.xml
d73d69f40ee1a21f1ae6eb9fe19bc6fa53995bf3
...
...
@@ -1,4 +1,5 @@
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
4
<title>Apache 2.x on Microsoft Windows</title>
4
5
<para>
...
...
@@ -7,7 +8,7 @@
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>
...
...
@@ -39,15 +40,17 @@
39
40
<sect2 xml:id="install.windows.apache2.module">
40
41
<title>Installing as an Apache handler</title>
41
42
<para>
42
-
To load the PHP module for Apache 2.x the following lines in the
43
+
To load the PHP module for Apache 2.x, the following lines in the
43
44
Apache &httpd.conf; configuration file must be inserted:
44
45
<example>
45
46
<title>PHP and Apache 2.x as handler</title>
46
47
<programlisting role="apache-conf">
47
48
<![CDATA[
48
-
#
49
-
LoadModule php8_module "c:/php/php8apache2_4.dll"
50
-
AddHandler application/x-httpd-php .php
49
+
# before PHP 8.0.0 the name of the module was php7_module
50
+
LoadModule php_module "c:/php/php8apache2_4.dll"
51
+
<FilesMatch \.php$>
52
+
SetHandler application/x-httpd-php
53
+
</FilesMatch>
51
54
# configure the path to php.ini
52
55
PHPIniDir "C:/php"
53
56
]]>
...
...
@@ -56,31 +59,13 @@ PHPIniDir "C:/php"
56
59
</para>
57
60
<note>
58
61
<simpara>
59
-
Remember, the actual path to PHP on must be substituted instead of
62
+
The actual path to PHP must be substituted instead of
60
63
<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>
64
+
Make sure that the file referenced in the <literal>LoadModule</literal> directive is at
65
+
the specified location. Use <filename>php7apache2_4.dll</filename>
63
66
for PHP 7, or <filename>php8apache2_4.dll</filename> for PHP 8.
64
67
</simpara>
65
68
</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
69
</sect2>
85
70

86
71
<sect2 xml:id="install.windows.apache2.cgi">
...
...
@@ -131,7 +116,7 @@ PHPIniDir "C:/php"
131
116
</para>
132
117
<para>
133
118
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:
119
+
to reflect how you have installed things on your particular system:
135
120

136
121
<example>
137
122
<title>Configure Apache to run PHP as FastCGI</title>
...
...
@@ -140,7 +125,9 @@ PHPIniDir "C:/php"
140
125
LoadModule fcgid_module modules/mod_fcgid.so
141
126
# Where is your php.ini file?
142
127
FcgidInitialEnv PHPRC "c:/php"
143
-
AddHandler fcgid-script .php
128
+
<FilesMatch \.php$>
129
+
SetHandler fcgid-script
130
+
</FilesMatch>
144
131
FcgidWrapper "c:/php/php-cgi.exe" .php
145
132
]]>
146
133
</programlisting>
147
134