Remove legacy Windows docs (#661)

Also fix the very weird indentation (sorry translations)

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
This commit is contained in:
George Peter Banyard 2021-06-13 23:20:58 +01:00 committed by GitHub
parent d26548d335
commit 8e732e84a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 559 additions and 2329 deletions

View file

@ -464,38 +464,9 @@ cgi error:
</question>
<answer>
<para>
There are several ways of doing this. If you are using Apache, read
their installation specific instructions (<link
linkend="install.windows.legacy.apache1">Apache 1</link>, <link
linkend="install.windows.legacy.apache2">Apache 2</link>), otherwise you must
set the <varname>PHPRC</varname> environment variable:
</para>
<para>
On Windows:
<itemizedlist>
<listitem><para>
Go to Control Panel and open the System icon (Start → Settings
→ Control Panel → System, or just Start → Control Panel
→ System)
</para></listitem>
<listitem><para>
Go to the Advanced tab
</para></listitem>
<listitem><para>
Click on the 'Environment Variables' button
</para></listitem>
<listitem><para>
Look into the 'System variables' pane
</para></listitem>
<listitem><para>
Click on 'New' and enter 'PHPRC' as the variable name and the
directory where &php.ini; is located as the variable value (e.g.
<literal>C:\php</literal>)
</para></listitem>
<listitem><para>
Press OK and restart your computer
</para></listitem>
</itemizedlist>
There are several ways of doing this. If you are using Apache,
refer to the Apache documentation, otherwise
you must set the <varname>PHPRC</varname> environment variable.
</para>
</answer>
</qandaentry>

View file

@ -1289,7 +1289,7 @@ This is a command line PHP script with one option.
<para>
On Windows, PHP can be configured to run without the need to
supply the <filename>C:\php\php.exe</filename> or the <literal>.php</literal>
extension, as described in <link linkend="install.windows.legacy.commandline">Command
extension, as described in <link linkend="install.windows.commandline">Command
Line PHP on Microsoft Windows</link>.
</para>

View file

@ -111,16 +111,15 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
(see next section for the download).
</para>
<para>
To compile an extension into PHP, please refer to <link linkend="install.windows.legacy.building">
To compile an extension into PHP, please refer to <link linkend="install.windows.building">
building from source</link> documentation.
</para>
<para>
To compile a standalone extension (aka a DLL file), please refer to <link linkend="install.windows.legacy.building">
To compile a standalone extension (aka a DLL file), please refer to <link linkend="install.windows.building">
building from source</link> documentation. If the DLL file is available neither with your
PHP distribution nor in PECL, you may have to compile it before you can start using the
extension.
</para>
<sect2 xml:id="install.pecl.windows.find">
<title>Where to find an extension?</title>
<para>

173
install/windows/apache2.xml Normal file
View file

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8"?>
<sect1 xml:id="install.windows.apache2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Apache 2.x on Microsoft Windows</title>
<para>
This section contains notes and hints specific to Apache 2.x installs
of PHP on Microsoft Windows systems.
</para>
<note>
<para>
You should read the <link linkend="install.windows.manual">manual
installation steps</link> first!
</para>
</note>
<para>
It is strongly recommended to consult the
<link xlink:href="&url.apache2.docs;">Apache Documentation</link>
to get have a basic understanding of the Apache 2.x Server.
Also consider reading the
<link xlink:href="&url.apache2.windows;">Windows specific notes</link>
for Apache 2.x before reading on here.
</para>
<para>
Download the most recent version of
<link xlink:href= "&url.apachelounge.download;">Apache 2.x</link>
and a fitting PHP version. Follow the
<link linkend="install.windows.manual">Manual Installation Steps</link>
and come back to go on with the integration of PHP and Apache.
</para>
<para>
There are three ways to set up PHP to work with Apache 2.x on Windows.
PHP can be run as a handler, as a CGI, or under FastCGI.
</para>
&note.apache.slashes;
<sect2 xml:id="install.windows.apache2.module">
<title>Installing as an Apache handler</title>
<para>
To load the PHP module for Apache 2.x the following lines in the
Apache &httpd.conf; configuration file must be inserted:
<example>
<title>PHP and Apache 2.x as handler</title>
<programlisting role="apache-conf">
<![CDATA[
#
LoadModule php8_module "c:/php/php8apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
]]>
</programlisting>
</example>
</para>
<note>
<simpara>
Remember, the actual path to PHP on must be substituted instead of
<filename>C:/php/</filename> in the above examples.
Take care that the file referenced in the LoadModule directive is at
the specified location, and to use <filename>php7apache2_4.dll</filename>
for PHP 7, or <filename>php8apache2_4.dll</filename> for PHP 8.
</simpara>
</note>
<para>
The above configuration will enable PHP handling of any file that has a
.php extension, even if there are other file extensions. For example, a
file named <filename>example.php.txt</filename> will be executed by the
PHP handler. To ensure that only files that <emphasis>end in</emphasis>
<filename>.php</filename> are executed, use the following configuration
instead:
</para>
<example>
<programlisting role="apache-conf">
<![CDATA[
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
]]>
</programlisting>
</example>
</sect2>
<sect2 xml:id="install.windows.apache2.cgi">
<title>Running PHP as CGI</title>
<para>
It is strongly recommended to consult the
<link xlink:href="&url.apache.cgi;">Apache CGI documentation</link>
for a more complete understanding of running CGI on Apache.
</para>
<para>
To run PHP as CGI, the php-cgi files will need to be placed in a
directory designated as a CGI directory using the ScriptAlias directive.
</para>
<para>
A <literal>#!</literal> line will need to be placed in the PHP files,
which point to the location of the PHP binary:
<example>
<title>PHP and Apache 2.x as CGI</title>
<programlisting>
<![CDATA[
#!C:/php/php.exe
<?php
phpinfo();
?>
]]>
</programlisting>
</example>
</para>
&warn.install.cgi;
</sect2>
<sect2 xml:id="install.windows.apache2.fastcgi">
<title>Running PHP under FastCGI</title>
<para>
Running PHP under FastCGI has a number of advantages over running it as a
CGI. Setting it up this way is fairly straightforward:
</para>
<para>
Obtain <literal>mod_fcgid</literal> from
<link xlink:href="&url.apachelounge.download;">&url.apachelounge;</link>.
Win32 binaries are available for download from that site.
Install the module according to the instructions that will come with it.
</para>
<para>
Configure your web server as shown below, taking care to adjust any paths
to reflect your how you have installed things on your particular system:
<example>
<title>Configure Apache to run PHP as FastCGI</title>
<programlisting>
<![CDATA[
LoadModule fcgid_module modules/mod_fcgid.so
# Where is your php.ini file?
FcgidInitialEnv PHPRC "c:/php"
AddHandler fcgid-script .php
FcgidWrapper "c:/php/php-cgi.exe" .php
]]>
</programlisting>
</example>
Files with a .php extension will now be executed by the PHP FastCGI
wrapper.
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.building" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<sect1 xml:id="install.windows.building" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Building from source</title>
<para>
This chapter teaches how to compile PHP from sources on windows, using
@ -11,8 +10,7 @@
See the Wiki documentation at:
<link xlink:href="&url.wiki.windows.build.howto;">&url.wiki.windows.build.howto;</link>
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -0,0 +1,209 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.windows.commandline" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Command Line PHP on Microsoft Windows</title>
<para>
This section contains notes and hints specific to getting PHP running
from the command line for Windows.
</para>
<note>
<para>
You should read the <link linkend="install.windows.manual">manual
installation steps</link> first!
</para>
</note>
<para>
Getting PHP to run from the command line can be performed without making
any changes to Windows.
<screen>
<![CDATA[
C:\php\php.exe -f "C:\PHP Scripts\script.php" -- -arg1 -arg2 -arg3
]]>
</screen>
</para>
<para>
But there are some easy steps that can be followed to make this simpler.
Some of these steps should already have been taken, but are repeated here
to be able to provide a complete step-by-step sequence.
<itemizedlist>
<note>
<para>
Both <envar>PATH</envar> and <envar>PATHEXT</envar> are important
pre-existing system variables in Windows,
and care should be taken to not overwrite either variable,
only to add to them.
</para>
</note>
<listitem>
<para>
Append the location of the PHP executable (<filename>php.exe</filename>,
<filename>php-win.exe</filename> or <filename>php-cli.exe</filename>
depending upon your PHP version and display preferences) to the
<envar>PATH</envar> environment variable. Read more about how to
add your PHP directory to <envar>PATH</envar> in the <link
linkend="faq.installation.addtopath">corresponding FAQ entry</link>.
</para>
</listitem>
<listitem>
<para>
Append the <literal>.PHP</literal> extension to the
<varname>PATHEXT</varname> environment variable. This can be done
at the same time as amending the <envar>PATH</envar> environment
variable. Follow the same steps as described in the <link
linkend="faq.installation.addtopath">FAQ</link> but amend the
<varname>PATHEXT</varname> environment variable rather than the
<envar>PATH</envar> environment variable.
<note>
<para>
The position in which you place the <literal>.PHP</literal> will
determine which script or program is executed when there are matching
filenames. For example, placing <literal>.PHP</literal> before
<literal>.BAT</literal> will cause your script to run, rather than
the batch file, if there is a batch file with the same name.
</para>
</note>
</para>
</listitem>
<listitem>
<para>
Associate the <literal>.PHP</literal> extension with a file type. This
is done by running the following command:
<screen>
<![CDATA[
assoc .php=phpfile
]]>
</screen>
</para>
</listitem>
<listitem>
<para>
Associate the <literal>phpfile</literal> file type with the appropriate
PHP executable. This is done by running the following command:
<screen>
<![CDATA[
ftype phpfile="C:\php\php.exe" -f "%1" -- %~2
]]>
</screen>
</para>
</listitem>
</itemizedlist>
</para>
<para>
Following these steps will allow PHP scripts to be run from any directory
without the need to type the PHP executable or the <literal>.PHP</literal>
extension and all parameters will be supplied to the script for processing.
</para>
<para>
The example below details some of the registry changes that can be made manually.
<example>
<title>Registry changes</title>
<screen>
<![CDATA[
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.php]
@="phpfile"
"Content Type"="application/php"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile]
@="PHP Script"
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008
"AlwaysShowExt"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\DefaultIcon]
@="C:\\php\\php-win.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell]
@="Open"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell\Open]
@="&Open"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell\Open\command]
@="\"C:\\php\\php.exe\" -f \"%1\" -- %~2"
]]>
</screen>
</example>
</para>
<para>
With these changes the same command can be written as:
<screen>
<![CDATA[
"C:\PHP Scripts\script" -arg1 -arg2 -arg3
]]>
</screen>
or, if your <literal>"C:\PHP Scripts"</literal> path is in the
<envar>PATH</envar> environment variable:
<screen>
<![CDATA[
script -arg1 -arg2 -arg3
]]>
</screen>
</para>
<note>
<para>
There is a small problem if you intend to use this technique and use your
PHP scripts as a command line filter, like the example below:
<screen>
<![CDATA[
dir | "C:\PHP Scripts\script" -arg1 -arg2 -arg3
]]>
</screen>
or
<screen>
<![CDATA[
dir | script -arg1 -arg2 -arg3
]]>
</screen>
You may find that the script simply hangs and nothing is output.
To get this operational, you need to make another registry change.
<screen>
<![CDATA[
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer]
"InheritConsoleHandles"=dword:00000001
]]>
</screen>
Further information regarding this issue can be found in this <link
xlink:href="http://support.microsoft.com/default.aspx?scid=kb;en-us;321788">Microsoft
Knowledgebase Article : 321788</link>.
As of Windows 10, this setting seems to be reversed, making the default install of
Windows 10 support inherited console handles automatically. This <link
xlink:href="https://social.msdn.microsoft.com/Forums/en-US/f19d740d-21c8-4dc2-a9ab-d5c0527e932b/nasty-file-association-regression-bug-in-windows-10-console?forum=windowssdk">
Microsoft forum post</link> provides the explanation.
</para>
</note>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

View file

@ -1,98 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="install.windows" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Installation on Windows systems</title>
<para>
Installing PHP on modern Microsoft Windows systems and recommended configuration with common web servers.
</para>
<note>
<title>Installation on Windows systems</title>
<para>
Installing PHP on modern Microsoft Windows systems and recommended configuration with common web servers.
</para>
<para>
The Official releases of PHP on Windows are recommended for production use.
However, you are welcome to build PHP from Source.
You will need a Visual Studio environment.
See <link xlink:href="&url.install.windows.stepbystep;">Step by Step Build Instructions</link>.
</para>
<para>
<itemizedlist spacing="compact">
<listitem>
<para>
If you are looking for information about older systems, such as Windows XP, 2003, 98 or Apache 1.x, see the <link linkend="install.windows.legacy.index">Legacy Info</link> section.
<link linkend="install.windows.commandline">Using PHP on Windows Command line</link>
</para>
</note>
</listitem>
<listitem>
<para>
<link linkend="install.cloud.azure">Installing PHP on Azure App Services</link>
(aka Microsoft Azure, Windows Azure, or (Windows) Azure Web Apps).
</para>
</listitem>
</itemizedlist>
</para>
<sect1 xml:id="install.windows.requirements">
<title>Install Requirements</title>
<para>
The Official releases of PHP on Windows are recommended for production use.
However, you are welcome to build PHP from Source. You will need a Visual Studio environment. See <link xlink:href="https://wiki.php.net/internals/windows/stepbystepbuild">Step by Step Build Instructions</link>.
PHP requires at least Windows 2008/Vista.
Either 32-Bit or 64-bit (<acronym>AKA</acronym> X86 or X64. PHP does not run on Windows RT/WOA/ARM).
As of PHP 7.2.0 Windows 2008 and Vista are no longer supported.
</para>
<para>
PHP requires the Visual C runtime (CRT). Many applications require that so it may already be installed.
</para>
<para>
The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable
for all these PHP versions, see
<link xlink:href="https://visualstudio.microsoft.com/downloads/">https://visualstudio.microsoft.com/downloads/</link>.
</para>
<para>
You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds.
</para>
<para>
If CRT is already installed, the installer will tell you that and not change anything.
</para>
<para>
The CRT installer supports the /quiet and /norestart command-line switches, so you can script running it.
</para>
</sect1>
<sect1 xml:id="install.windows.pecl">
<title>PECL</title>
<para>
PECL extensions are pre-built for Windows and available from:
<link xlink:href="http://windows.php.net/downloads/pecl/releases/">http://windows.php.net/downloads/pecl/releases/</link>
</para>
<para>
<itemizedlist spacing="compact">
<listitem>
<para>
<link linkend="install.windows.legacy.commandline">Using PHP on Windows Command line</link>
</para>
</listitem>
<listitem>
<para>
<link linkend="install.cloud.azure">Installing PHP on Azure App Services</link> (aka Microsoft Azure, Windows Azure, or (Windows) Azure Web Apps).
</para>
</listitem>
</itemizedlist>
Some extensions use features specific to some Unix systems and so are not available on Windows.
Otherwise, all extensions are available for Windows.
</para>
</sect1>
<sect1 xml:id="install.windows.requirements">
<title>Install Requirements</title>
<para>
PHP 5.5+ require at least Windows 2008/Vista, or 2008r2, 2012, 2012r2, 2016 or 7, 8, 8.1, 10. Either 32-Bit or 64-bit (aka X86 or X64. PHP does not run on Windows RT/WOA/ARM).
As of PHP 7.2.0 Windows 2008 and Vista are no longer supported.
</para>
<para>
PHP requires the Visual C runtime(CRT). Many applications require that so it may already be installed.
</para>
<para>
PHP 5.5 and 5.6 require VC CRT 11 (Visual Studio 2012). See: <link xlink:href="https://www.microsoft.com/en-us/download/details.aspx?id=30679">https://www.microsoft.com/en-us/download/details.aspx?id=30679</link>
</para>
<para>
PHP 7.0 and 7.1 require VC CRT 14 (Visual Studio 2015).
PHP 7.2, 7.3 and 7.4 require VC CRT 15 (Visual Studio 2017).
The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable
for all these PHP versions, see
<link xlink:href="https://visualstudio.microsoft.com/downloads/">https://visualstudio.microsoft.com/downloads/</link>.
</para>
<para>
You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds.
</para>
<para>
If CRT is already installed, the installer will tell you that and not change anything.
</para>
<para>
The CRT installer supports the /quiet and /norestart command-line switches, so you can script running it.
</para>
<para>
VC11 CRT DLLs can be copied from your local machine to a remote machine(a `Copy Deployment` installation) instead of running the installer on the remote machine (such as a web server you have restricted access to).
</para>
<para>
VC14 CRT does not support a `Copy Deployment` installation. VC14 CRT has many more DLLs(most in files with names starting with api-*). If you can find them all and copy them, it will also work (try a tool like Resource Hacker to get a list of all the DLLs to copy).
</para>
</sect1>
<sect1 xml:id="install.windows.pecl">
<title>PECL</title>
<para>PECL extensions are pre-built for Windows and available from: <link xlink:href="http://windows.php.net/downloads/pecl/releases/">http://windows.php.net/downloads/pecl/releases/</link>
</para>
<para>Some extensions use features specific to some Unix systems and so are not available on Windows. Otherwise, all extensions are available for Windows.
</para>
</sect1>
<!-- Critical: ensure all pages in install/windows and that install/windows/legacy/index are referenced here!
otherwise you will get IDREF attribute errors for all links -->
&install.windows.tools;
&install.windows.recommended;
&install.windows.manual;
&install.windows.troubleshooting;
&install.windows.legacy.index;
&install.windows.tools;
&install.windows.recommended;
&install.windows.manual;
&install.windows.building;
&install.windows.commandline;
&install.windows.apache2;
&install.windows.troubleshooting;
</chapter>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,166 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.apache1" xmlns="http://docbook.org/ns/docbook">
<title>Apache 1.3.x on Microsoft Windows</title>
<para>
This section contains notes and hints specific to Apache 1.3.x installs
of PHP on Microsoft Windows systems. There are also
<!--<link linkend="install.windows.legacy.apache2">instructions and notes
for Apache 2</link> on a separate page.-->
</para>
<note>
<para>
Please read the <link linkend="install.windows.legacy.manual">manual
installation steps</link> first!
</para>
</note>
<simpara>
There are two ways to set up PHP to work with Apache 1.3.x
on Windows. One is to use the CGI binary (<filename>php.exe</filename>
for PHP 4 and <filename>php-cgi.exe</filename> for PHP 5),
the other is to use the Apache Module DLL. In either case
you need to edit your &httpd.conf; to configure Apache to
work with PHP, and then restart the server.
</simpara>
<simpara>
It is worth noting here that now the SAPI module has been
made more stable under Windows, we recommend it's use above
the CGI binary, since it is more transparent and secure.
</simpara>
<simpara>
Although there can be a few variations of configuring PHP
under Apache, these are simple enough to be used by the
newcomer. Please consult the Apache Documentation for further
configuration directives.
</simpara>
<simpara>
After changing the configuration file, remember to restart the server, for
example, <command>NET STOP APACHE</command> followed by
<command>NET START APACHE</command>, if you run Apache as a Windows
Service, or use your regular shortcuts.
</simpara>
&note.apache.slashes;
<sect3 xml:id="install.windows.legacy.apache1.module">
<title>Installing as an Apache module</title>
<para>
You should add the following lines to your Apache &httpd.conf; file:
</para>
<para>
<example>
<title>PHP as an Apache 1.3.x module</title>
<para>
This assumes PHP is installed to <filename>c:\php</filename>. Adjust the
path if this is not the case.
</para>
<para>
For PHP 4:
</para>
<programlisting role="apache-conf">
<![CDATA[
# Add to the end of the LoadModule section
# Don't forget to copy this file from the sapi directory!
LoadModule php4_module "C:/php/php4apache.dll"
# Add to the end of the AddModule section
AddModule mod_php4.c
]]>
</programlisting>
<para>
For PHP 5:
</para>
<programlisting role="apache-conf">
<![CDATA[
# Add to the end of the LoadModule section
LoadModule php5_module "C:/php/php5apache.dll"
# Add to the end of the AddModule section
AddModule mod_php5.c
]]>
</programlisting>
<para>
For both:
</para>
<programlisting role="apache-conf">
<![CDATA[
# Add this line inside the <IfModule mod_mime.c> conditional brace
AddType application/x-httpd-php .php
# For syntax highlighted .phps files, also add
AddType application/x-httpd-php-source .phps
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.apache1.cgi">
<title>Installing as a CGI binary</title>
<para>
If you unzipped the PHP package to <filename>C:\php\</filename> as described
in the <link linkend="install.windows.legacy.manual">Manual
Installation Steps</link> section, you need to insert
these lines to your Apache configuration file to set
up the CGI binary:
<example>
<title>PHP and Apache 1.3.x as CGI</title>
<programlisting role="apache-conf">
<![CDATA[
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
# For PHP 4
Action application/x-httpd-php "/php/php.exe"
# For PHP 5
Action application/x-httpd-php "/php/php-cgi.exe"
# specify the directory where php.ini is
SetEnv PHPRC C:/php
]]>
</programlisting>
</example>
Note that the second line in the list above can be found
in the actual versions of &httpd.conf;, but it is commented out. Remember
also to substitute the <filename>c:/php/</filename> for your actual path to
PHP.
</para>
&warn.install.cgi;
<simpara>
If you would like to present PHP source files syntax highlighted, there
is no such convenient option as with the module version of PHP.
If you chose to configure Apache to use PHP as a CGI binary, you
will need to use the <function>highlight_file</function> function. To
do this simply create a PHP script file and add this code:
<literal>&lt;?php highlight_file('some_php_script.php'); ?&gt;</literal>.
</simpara>
</sect3>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,198 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.apache2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Apache 2.x on Microsoft Windows</title>
<para>
This section contains notes and hints specific to Apache 2.x installs
of PHP on Microsoft Windows systems. We also
<!--have <link linkend="install.windows.legacy.apache1">instructions and notes
for Apache 1.3.x users on a separate page</link>.-->
</para>
<note>
<para>
You should read the <link linkend="install.windows.legacy.manual">manual
installation steps</link> first!
</para>
</note>
<note>
<title>Apache 2.2 Support</title>
<para>
Users of Apache 2.2 should note that the DLL file for Apache 2.2 is
named <filename>php5apache2_2.dll</filename> rather than <filename>php5apache2.dll</filename>
and is available only for PHP 5.2.0 and later.
</para>
</note>
<para>
You are strongly encouraged to consult the
<link xlink:href="&url.apache2.docs;">Apache Documentation</link> to get
a basic understanding of the Apache 2.x Server. Also consider
reading the <link xlink:href="&url.apache2.windows;">Windows specific
notes</link> for Apache 2.x before reading on here.
</para>
<para>
Apache 2.x is designed to run on the Windows version designated as
server platforms, such as Windows NT 4.0, Windows 2000,
Windows XP, or Windows 7. While Apache 2.x works tolerably well on Windows 9x,
support on these platforms is incomplete, and some things will not work
correctly. There is no plan to remedy this situation.
</para>
<para>
Download the most recent version of <link xlink:href= "&url.apache;">
Apache 2.x</link> and a fitting PHP version.
Follow the <link linkend="install.windows.legacy.manual">Manual Installation
Steps</link> and come back to go on with the integration of PHP and Apache.
</para>
<para>
There are three ways to set up PHP to work with Apache 2.x on Windows.
You can run PHP as a handler, as a CGI, or under FastCGI.
</para>
&note.apache.slashes;
<sect3 xml:id="install.windows.apache2.legacy.module">
<title>Installing as an Apache handler</title>
<para>
You need to insert the following lines into your
Apache &httpd.conf; configuration file to load the
PHP module for Apache 2.x:
<example>
<title>PHP and Apache 2.x as handler</title>
<programlisting role="apache-conf">
<![CDATA[
#
LoadModule php5_module "c:/php/php5apache2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
]]>
</programlisting>
</example>
</para>
<note>
<simpara>
Remember to substitute your actual path to PHP for the
<filename>C:/php/</filename> in the above examples. Take care to use
either <filename>php5apache2.dll</filename> or
<filename>php5apache2_2.dll</filename> in your LoadModule directive and
verify that the referenced file is in fact located at the file path
that you point to in this directive.
</simpara>
</note>
<para>
The above configuration will enable PHP handling of any file that has a
.php extension, even if there are other file extensions. For example, a
file named <filename>example.php.txt</filename> will be executed by the
PHP handler. To ensure that only files that <emphasis>end in</emphasis>
<filename>.php</filename> are executed, use the following configuration
instead:
</para>
<example>
<programlisting role="apache-conf">
<![CDATA[
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
]]>
</programlisting>
</example>
</sect3>
<sect3 xml:id="install.windows.apache2.legacy.cgi">
<title>Running PHP as CGI</title>
<para>
You should consult the <link xlink:href="&url.apache.cgi;">Apache CGI
documentation</link> for a more complete understanding of running CGI
on Apache.
</para>
<para>
To run PHP as CGI, you'll need to place your php-cgi files in a
directory designated as a CGI directory using the ScriptAlias directive.
</para>
<para>
You will then need to insert a #! line in the PHP files, pointing to the
location of your PHP binary:
<example>
<title>PHP and Apache 2.x as CGI</title>
<programlisting>
<![CDATA[
#!C:/php/php.exe
<?php
phpinfo();
?>
]]>
</programlisting>
</example>
</para>
&warn.install.cgi;
</sect3>
<sect3 xml:id="install.windows.apache2.legacy.fastcgi">
<title>Running PHP under FastCGI</title>
<para>
Running PHP under FastCGI has a number of advantages over running it as a
CGI. Setting it up this way is fairly straightforward:
</para>
<para>
Obtain mod_fcgid from
<link xlink:href="&url.apache.fcgid;">&url.apache.fcgid;</link>. Win32
binaries are available for download from that site. Install the module
according to the instructions that will come with it.
</para>
<para>
Configure your web server as shown below, taking care to adjust any paths
to reflect your how you have installed things on your particular system:
<example>
<title>Configure Apache to run PHP as FastCGI</title>
<programlisting>
<![CDATA[
LoadModule fcgid_module modules/mod_fcgid.so
# Where is your php.ini file?
FcgidInitialEnv PHPRC "c:/php"
AddHandler fcgid-script .php
FcgidWrapper "c:/php/php-cgi.exe" .php
]]>
</programlisting>
</example>
Files with a .php extension will now be executed by the PHP FastCGI
wrapper.
</para>
</sect3>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,209 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.commandline" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Command Line PHP on Microsoft Windows</title>
<para>
This section contains notes and hints specific to getting PHP running
from the command line for Windows.
</para>
<note>
<para>
You should read the <link linkend="install.windows.legacy.manual">manual
installation steps</link> first!
</para>
</note>
<para>
Getting PHP to run from the command line can be performed without making
any changes to Windows.
<screen>
<![CDATA[
C:\PHP5\php.exe -f "C:\PHP Scripts\script.php" -- -arg1 -arg2 -arg3
]]>
</screen>
</para>
<para>
But there are some easy steps that can be followed to make this simpler.
Some of these steps should already have been taken, but are repeated here
to be able to provide a complete step-by-step sequence.
<itemizedlist>
<note>
<para>
Both <envar>PATH</envar> and <envar>PATHEXT</envar> are important pre-existing system variables in Windows, and care should be taken to not overwrite either variable, only to add to them.
</para>
</note>
<listitem>
<para>
Append the location of the PHP executable (<filename>php.exe</filename>,
<filename>php-win.exe</filename> or <filename>php-cli.exe</filename>
depending upon your PHP version and display preferences) to the
<envar>PATH</envar> environment variable. Read more about how to
add your PHP directory to <envar>PATH</envar> in the <link
linkend="faq.installation.addtopath">corresponding FAQ entry</link>.
</para>
</listitem>
<listitem>
<para>
Append the <literal>.PHP</literal> extension to the
<varname>PATHEXT</varname> environment variable. This can be done
at the same time as amending the <envar>PATH</envar> environment
variable. Follow the same steps as described in the <link
linkend="faq.installation.addtopath">FAQ</link> but amend the
<varname>PATHEXT</varname> environment variable rather than the
<envar>PATH</envar> environment variable.
<note>
<para>
The position in which you place the <literal>.PHP</literal> will
determine which script or program is executed when there are matching
filenames. For example, placing <literal>.PHP</literal> before
<literal>.BAT</literal> will cause your script to run, rather than
the batch file, if there is a batch file with the same name.
</para>
</note>
</para>
</listitem>
<listitem>
<para>
Associate the <literal>.PHP</literal> extension with a file type. This
is done by running the following command:
<screen>
<![CDATA[
assoc .php=phpfile
]]>
</screen>
</para>
</listitem>
<listitem>
<para>
Associate the <literal>phpfile</literal> file type with the appropriate
PHP executable. This is done by running the following command:
<screen>
<![CDATA[
ftype phpfile="C:\PHP5\php.exe" -f "%1" -- %~2
]]>
</screen>
</para>
</listitem>
</itemizedlist>
</para>
<para>
Following these steps will allow PHP scripts to be run from any directory
without the need to type the PHP executable or the <literal>.PHP</literal>
extension and all parameters will be supplied to the script for processing.
</para>
<para>
The example below details some of the registry changes that can be made manually.
<example>
<title>Registry changes</title>
<screen>
<![CDATA[
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.php]
@="phpfile"
"Content Type"="application/php"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile]
@="PHP Script"
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008
"AlwaysShowExt"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\DefaultIcon]
@="C:\\PHP5\\php-win.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell]
@="Open"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell\Open]
@="&Open"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell\Open\command]
@="\"C:\\PHP5\\php.exe\" -f \"%1\" -- %~2"
]]>
</screen>
</example>
</para>
<para>
With these changes the same command can be written as:
<screen>
<![CDATA[
"C:\PHP Scripts\script" -arg1 -arg2 -arg3
]]>
</screen>
or, if your <literal>"C:\PHP Scripts"</literal> path is in the
<envar>PATH</envar> environment variable:
<screen>
<![CDATA[
script -arg1 -arg2 -arg3
]]>
</screen>
</para>
<note>
<para>
There is a small problem if you intend to use this technique and use your
PHP scripts as a command line filter, like the example below:
<screen>
<![CDATA[
dir | "C:\PHP Scripts\script" -arg1 -arg2 -arg3
]]>
</screen>
or
<screen>
<![CDATA[
dir | script -arg1 -arg2 -arg3
]]>
</screen>
You may find that the script simply hangs and nothing is output.
To get this operational, you need to make another registry change.
<screen>
<![CDATA[
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer]
"InheritConsoleHandles"=dword:00000001
]]>
</screen>
Further information regarding this issue can be found in this <link
xlink:href="http://support.microsoft.com/default.aspx?scid=kb;en-us;321788">Microsoft
Knowledgebase Article : 321788</link>.
As of Windows 10, this setting seems to be reversed, making the default install of
Windows 10 support inherited console handles automatically. This <link
xlink:href="https://social.msdn.microsoft.com/Forums/en-US/f19d740d-21c8-4dc2-a9ab-d5c0527e932b/nasty-file-association-regression-bug-in-windows-10-console?forum=windowssdk">
Microsoft forum post</link> provides the explanation.
</para>
</note>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,361 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.extensions" xmlns="http://docbook.org/ns/docbook">
<title>Installation of extensions on Windows</title>
<para>
After installing PHP and a web server on Windows, you will probably want to
install some extensions for added functionality. You can choose which
extensions you would like to load when PHP starts by modifying your
&php.ini;. You can also load a module dynamically in your script using
<function>dl</function>.
</para>
<para>
The DLLs for PHP extensions are prefixed with <literal>php_</literal>.
</para>
<para>
Many extensions are <emphasis>built into</emphasis> the Windows version
of PHP. This means additional DLL files, and the
<link linkend="ini.extension">extension</link> directive, are
<emphasis>not</emphasis> used to load these extensions. The Windows
<link linkend ="install.windows.legacy.extensions.overview">PHP Extensions</link>
table lists extensions that require, or used to require, additional PHP
DLL files. Here's a list of built in extensions (updated PHP 5.0.4):
<link linkend="book.bc">BCMath</link>,
<link linkend="book.calendar">Calendar</link>,
<link linkend="book.com">COM</link>,
<link linkend="book.ctype">Ctype</link>,
<link linkend="book.dom">DOM</link>,
<link linkend="book.ftp">FTP</link>,
<link linkend="book.libxml">LibXML</link>,
<link linkend="book.iconv">Iconv</link>,
<link linkend="book.uodbc">ODBC</link>,
<link linkend="book.pcre">PCRE</link>,
<link linkend="book.session">Session</link>,
<link linkend="book.simplexml">SimpleXML</link>,
<link linkend="book.spl">SPL</link>,
<link linkend="book.wddx">WDDX</link>,
<link linkend="book.xml">XML</link>&listendand;
<link linkend="book.zlib">Zlib</link>.
</para>
<para>
The default location PHP searches for extensions is
<filename class="directory">C:\php5</filename>. To change this
setting to reflect your setup of PHP edit your &php.ini; file:
<itemizedlist>
<listitem>
<para>
You will need to change the
<link linkend ="ini.extension-dir">extension_dir</link> setting to
point to the directory where your extensions lives, or where you have
placed your <filename>php_*.dll</filename> files. For example:
<informalexample>
<programlisting role="ini">
<![CDATA[
extension_dir = C:\php\extensions
]]>
</programlisting>
</informalexample>
</para>
</listitem>
<listitem>
<para>
Enable the extension(s) in &php.ini; you want to use by uncommenting the
<literal>extension=php_*.dll</literal> lines in &php.ini;. This is done
by deleting the leading ; from the extension you want to load.
<example>
<title>Enable <link linkend="book.bzip2">Bzip2</link> extension for PHP-Windows</title>
<programlisting role="ini">
<![CDATA[
// change the following line from ...
;extension=php_bz2.dll
// ... to
extension=php_bz2.dll
]]>
</programlisting>
</example>
</para>
</listitem>
<listitem>
<para>
Some of the extensions need extra DLLs to work. Couple of them can be
found in the distribution package, in the main folder, but some, for example Oracle
(<filename>php_oci8.dll</filename>) require DLLs which are not bundled
with the distribution package. Don't forget to include <filename
class="directory">C:\php</filename> in the system
<envar>PATH</envar> (this process is explained in a separate <link
linkend="faq.installation.addtopath">FAQ entry</link>).
</para>
</listitem>
<listitem>
<para>
Some of these DLLs are not bundled with the PHP distribution. See each
extensions documentation page for details. Also, read the manual
section titled <link linkend="install.pecl">Installation of PECL
extensions</link> for details on <acronym>PECL</acronym>. An
increasingly large number of PHP extensions are found in
<acronym>PECL</acronym>, and these extensions require a
<link linkend="install.pecl.downloads">separate download</link>.
</para>
</listitem>
</itemizedlist>
<note>
<simpara>
If you are running a server module version of PHP
remember to restart your web server to reflect your changes to &php.ini;.
</simpara>
</note>
</para>
<para>
The following table describes some of the extensions available and required
additional dlls.
<table xml:id="install.windows.legacy.extensions.overview">
<title>PHP Extensions</title>
<tgroup cols="3">
<thead>
<row>
<entry>Extension</entry>
<entry>Description</entry>
<entry>Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry>php_bz2.dll</entry>
<entry><link linkend="book.bzip2">bzip2</link> compression functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_calendar.dll</entry>
<entry><link linkend="book.calendar">Calendar</link> conversion functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_ctype.dll</entry>
<entry><link linkend="book.ctype">ctype</link> family functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_curl.dll</entry>
<entry><link linkend="book.curl">CURL</link>, Client URL library functions</entry>
<entry>Requires: <filename>libeay32.dll</filename>,
<filename>ssleay32.dll</filename> (bundled), or, as of OpenSSL 1.1
<filename>libcrypto-*.dll</filename> and <filename>libssl-*.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_dba.dll</entry>
<entry><link linkend="book.dba">DBA</link>: DataBase (dbm-style)
Abstraction layer functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_dbase.dll</entry>
<entry><link linkend="book.dbase">dBase</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_exif.dll</entry>
<entry><link linkend="book.exif">EXIF</link> functions</entry>
<entry>
<link linkend="book.mbstring">php_mbstring.dll</link>. And,
<filename>php_exif.dll</filename> must be loaded <literal>after</literal>
<filename>php_mbstring.dll</filename> in &php.ini;.
</entry>
</row>
<row>
<entry>php_fbsql.dll</entry>
<entry><link linkend="book.fbsql">FrontBase</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_fdf.dll</entry>
<entry><link linkend="book.fdf">FDF</link>: Forms Data Format functions.</entry>
<entry>Requires: <filename>fdftk.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_ftp.dll</entry>
<entry><link linkend="book.ftp">FTP</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_gd2.dll</entry>
<entry><link linkend="book.image">GD</link> library image functions</entry>
<entry>GD2</entry>
</row>
<row>
<entry>php_gettext.dll</entry>
<entry><link linkend="book.gettext">Gettext</link> functions</entry>
<entry>
PHP &lt;= 4.2.0 requires <filename>gnu_gettext.dll</filename> (bundled),
PHP &gt;= 4.2.3 requires <filename>libintl-1.dll</filename>,
<filename>iconv.dll</filename> (bundled).
</entry>
</row>
<row>
<entry>php_hyperwave.dll</entry>
<entry>HyperWave functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_iconv.dll</entry>
<entry><link linkend="book.iconv">ICONV</link> characterset conversion</entry>
<entry>
Requires: <filename>iconv-1.3.dll</filename> (bundled), <filename>iconv.dll</filename>
</entry>
</row>
<row>
<entry>php_iisfunc.dll</entry>
<entry>IIS management functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_imap.dll</entry>
<entry><link linkend="book.imap">IMAP</link> POP3 and NNTP functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_interbase.dll</entry>
<entry><link linkend="book.ibase">InterBase</link> functions</entry>
<entry>Requires: <filename>gds32.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_ldap.dll</entry>
<entry><link linkend="book.ldap">LDAP</link> functions</entry>
<entry>
Requires <filename>libeay32.dll</filename>,
<filename>ssleay32.dll</filename> (bundled), or, as of OpenSSL 1.1
<filename>libcrypto-*.dll</filename> and <filename>libssl-*.dll</filename> (bundled)
</entry>
</row>
<row>
<entry>php_mbstring.dll</entry>
<entry><link linkend="book.mbstring">Multi-Byte String</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_mcrypt.dll</entry>
<entry><link linkend="book.mcrypt">Mcrypt Encryption</link> functions</entry>
<entry>Requires: <filename>libmcrypt.dll</filename></entry>
</row>
<row>
<entry>php_mhash.dll</entry>
<entry><link linkend="book.mhash">Mhash</link> functions</entry>
<entry>Requires: <filename>libmhash.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_mysql.dll</entry>
<entry><link linkend="book.mysql">MySQL</link> functions</entry>
<entry>Requires <filename>libmysql.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_mysqli.dll</entry>
<entry><link linkend="book.mysqli">MySQLi</link> functions</entry>
<entry>Requires <filename>libmysql.dll</filename>
(<filename>libmysqli.dll</filename> in PHP &lt;= 5.0.2) (bundled)</entry>
</row>
<row>
<entry>php_oci8.dll</entry>
<entry><link linkend="book.oci8">Oracle 8</link> functions</entry>
<entry>Requires: Oracle 8.1+ client libraries</entry>
</row>
<row>
<entry>php_openssl.dll</entry>
<entry><link linkend="book.openssl">OpenSSL</link> functions</entry>
<entry>Requires: <filename>libeay32.dll</filename> (bundled),
or, as of OpenSSL 1.1, <filename>liblibcrypto-*.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_pgsql.dll</entry>
<entry><link linkend="book.pgsql">PostgreSQL</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_shmop.dll</entry>
<entry><link linkend="book.shmop">Shared Memory</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_snmp.dll</entry>
<entry><link linkend="book.snmp">SNMP</link> get and walk functions</entry>
<entry>NT only!</entry>
</row>
<row>
<entry>php_soap.dll</entry>
<entry><link linkend="book.soap">SOAP</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_sockets.dll</entry>
<entry><link linkend="book.sockets">Socket</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_tidy.dll</entry>
<entry><link linkend="book.tidy">Tidy</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_tokenizer.dll</entry>
<entry><link linkend="book.tokenizer">Tokenizer</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_w32api.dll</entry>
<entry>W32api functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_xmlrpc.dll</entry>
<entry><link linkend="book.xmlrpc">XML-RPC</link> functions</entry>
<entry>Requires: <filename>iconv.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_xslt.dll</entry>
<entry>XSLT functions</entry>
<entry>
Requires <filename>sablot.dll</filename>, <filename>expat.dll</filename>,
<filename>iconv.dll</filename> (bundled).
</entry>
</row>
<row>
<entry>php_yaz.dll</entry>
<entry><link linkend="book.yaz">YAZ</link> functions</entry>
<entry>Requires: <filename>yaz.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_zip.dll</entry>
<entry><link linkend="book.zip">Zip File</link> functions</entry>
<entry>Read only access</entry>
</row>
<row>
<entry>php_zlib.dll</entry>
<entry><link linkend="book.zlib">ZLib</link> compression functions</entry>
<entry>None</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.iis" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Microsoft IIS</title>
<para>
This section contains PHP installation instructions specific to Microsoft Internet Information Services (IIS).
</para>
<itemizedlist>
<listitem>
<simpara>
<link linkend="install.windows.legacy.iis6">Manually installing PHP on Microsoft IIS 5.1 and IIS 6.0</link>
</simpara>
</listitem>
<listitem>
<simpara>
<link linkend="install.windows.legacy.iis7">Manually installing PHP on Microsoft IIS 7.0 and later</link>
</simpara>
</listitem>
</itemizedlist>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,241 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.iis6" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Microsoft IIS 5.1 and IIS 6.0</title>
<para>
This section contains instructions for manually setting up Internet Information
Services (IIS) 5.1 and IIS 6.0 to work with PHP on Microsoft Windows XP and Windows
Server 2003. For instructions on setting up IIS 7.0 and later versions on Windows
Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2 refer to
<link linkend="install.windows.legacy.iis7">Microsoft IIS 7.0 and later</link>.
</para>
<sect3 xml:id="install.windows.legacy.iis6.fastcgi">
<title>Configuring IIS to process PHP requests</title>
<para>
Download and install PHP in accordance to the instructions described in
<link linkend="install.windows.legacy.manual">manual installation steps</link>
<note>
<para>
Non-thread-safe build of PHP is recommended when using IIS. The non-thread-safe
builds are available at <link xlink:href="&url.php.win.downloads;">PHP for Windows:
Binaries and Sources Releases.</link>
</para>
</note>
</para>
<para>
Configure the CGI- and FastCGI-specific settings in <filename>php.ini</filename> file as shown below:
<example>
<title>CGI and FastCGI settings in <filename>php.ini</filename></title>
<programlisting role="ini">
<![CDATA[
fastcgi.impersonate = 1
fastcgi.logging = 0
cgi.fix_pathinfo=1
cgi.force_redirect = 0
]]>
</programlisting>
</example>
</para>
<para>
Download and install the <link xlink:href="&url.iis.fastcgi.downloads;">Microsoft FastCGI Extension for IIS 5.1 and 6.0</link>.
The extension is available for 32-bit and 64-bit platforms - select the right download package for your platform.
</para>
<para>Configure the FastCGI extension to handle PHP-specific requests by running the command shown below.
Replace the value of the &quot;-path&quot; parameter with the absolute file path to the
<filename>php-cgi.exe</filename> file.
<example>
<title>Configuring FastCGI extension to handle PHP requests</title>
<programlisting>
<![CDATA[
cscript %windir%\system32\inetsrv\fcgiconfig.js -add -section:"PHP" ^
-extension:php -path:"C:\PHP\php-cgi.exe"
]]>
</programlisting>
</example>
</para>
<para>
This command will create an IIS script mapping for *.php file extension, which will result in all URLs
that end with .php being handled by FastCGI extension. Also, it will configure FastCGI extension to
use the executable <filename>php-cgi.exe</filename> to process the PHP requests.
<note>
<para>
At this point the required installation and configuration steps are completed. The remaining
instructions below are optional but highly recommended for achieving optimal functionality
and performance of PHP on IIS.
</para>
</note>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis6.impersonation">
<title>Impersonation and file system access</title>
<para>
It is recommended to enable FastCGI impersonation in PHP when using IIS. This
is controlled by the <varname>fastcgi.impersonate</varname> directive in <filename>php.ini</filename> file. When
impersonation is enabled, PHP will perform all the file system operations on
behalf of the user account that has been determined by IIS authentication. This
ensures that even if the same PHP process is shared across different IIS web
sites, the PHP scripts in those web sites will not be able to access each
others&#39; files as long as different user accounts are used for IIS authentication
on each web site.
</para>
<para>
For example IIS 5.1 and IIS 6.0, in its default configuration, has anonymous authentication enabled
with built-in user account IUSR_&lt;MACHINE_NAME&gt; used as a default identity. This means that in
order for IIS to execute PHP scripts, it is necessary to grant IUSR_&lt;MACHINE_NAME&gt; account
read permission on those scripts. If PHP applications need to perform write operations on certain
files or write files into some folders then IUSR_&lt;MACHINE_NAME&gt; account should have write permission to those.
</para>
<para>
To determine which user account is used by IIS anonymous authentication, follow these steps:
<procedure>
<step>
<simpara>In the Windows Start Menu choose &quot;Run:&quot;, type &quot;inetmgr&quot; and click &quot;Ok&quot;;</simpara>
</step>
<step>
<simpara>Expand the list of web sites under the &quot;Web Sites&quot; node in the tree view, right-click on a web
site that is being used and select &quot;Properties&quot;;
</simpara>
</step>
<step>
<simpara>Click the &quot;Directory Security&quot; tab;</simpara>
</step>
<step>
<simpara>Take note of a &quot;User name:&quot; field in the &quot;Authentication Methods&quot; dialog</simpara>
</step>
</procedure>
<mediaobject>
<alt>Anonymous authenication for IIS 5.1 and IIS 6.0</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis6anonauth.png" width="654" depth="461" />
</imageobject>
</mediaobject>
</para>
<para>
To modify the permissions settings on files and folders, use the Windows Explorer user interface
or <varname>icacls</varname> command.
<example>
<title>Configuring file access permissions</title>
<programlisting>
<![CDATA[
icacls C:\inetpub\wwwroot\upload /grant IUSR:(OI)(CI)(M)
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis6.defaultdoc">
<title>Set <filename>index.php</filename> as a default document in IIS</title>
<para>
The IIS default documents are used for HTTP requests that do not specify a document name. With PHP applications,
<filename>index.php</filename> usually acts as a default document. To add <filename>index.php</filename> to the list of
IIS default documents, follow these steps:
<procedure>
<step>
<simpara>In the Windows Start Menu choose &quot;Run:&quot;, type &quot;inetmgr&quot; and click &quot;Ok&quot;;</simpara>
</step>
<step>
<simpara>Right-click on the &quot;Web Sites&quot; node in the tree view and select &quot;Properties&quot;;</simpara>
</step>
<step>
<simpara>Click the &quot;Documents&quot; tab;</simpara>
</step>
<step>
<simpara>Click the &quot;Add...&quot; button and enter &quot;index.php&quot; for the &quot;Default content page:&quot;.</simpara>
</step>
</procedure>
<mediaobject>
<alt>Setting index.php as default document for IIS</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis6defaultdoc.png" width="659" depth="465" />
</imageobject>
</mediaobject>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis6.recycling">
<title>FastCGI and PHP Recycling configuration</title>
<para>
Configure IIS FastCGI extension settings for recycling of PHP processes by using the commands shown below.
The FastCGI setting <varname>instanceMaxRequests</varname> controls how many requests will be processed by a single
<filename>php-cgi.exe</filename> process before FastCGI extension shuts it down. The PHP environment variable
<varname>PHP_FCGI_MAX_REQUESTS</varname> controls how many requests a single <filename>php-cgi.exe</filename> process
will handle before it recycles itself. Make sure that the value specified for FastCGI <varname>InstanceMaxRequests</varname>
setting is less than or equal to the value specified for <varname>PHP_FCGI_MAX_REQUESTS</varname>.
<example>
<title>Configuring FastCGI and PHP recycling</title>
<programlisting>
<![CDATA[
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^
-InstanceMaxRequests:10000
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^
-EnvironmentVars:PHP_FCGI_MAX_REQUESTS:10000
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis6.timeouts">
<title>Configuring FastCGI timeout settings</title>
<para>
Increase the timeout settings for FastCGI extension if there are applications that have long running PHP scripts.
The two settings that control timeouts are <varname>ActivityTimeout</varname> and <varname>RequestTimeout</varname>.
Refer to <link xlink:href="&url.iis.fastcgi.settings;">Configuring FastCGI Extension for IIS 6.0</link> for more
information about those settings.
<example>
<title>Configuring FastCGI timeout settings</title>
<programlisting>
<![CDATA[
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^
-ActivityTimeout:90
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^
-RequestTimeout:90
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis6.phpinilocation">
<title>Changing the Location of <filename>php.ini</filename> file</title>
<para>
PHP searches for <filename>php.ini</filename> file in
<link linkend="configuration.file">several locations</link> and it is
possible to change the default locations of <filename>php.ini</filename>
file by using <varname>PHPRC</varname> environment variable. To instruct PHP
to load the configuration file from a custom location run the command shown below.
The absolute path to the directory with <filename>php.ini</filename> file should be
specified as a value of <varname>PHPRC</varname> environment variable.
<example>
<title>Changing the location of <filename>php.ini</filename> file</title>
<programlisting>
<![CDATA[
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^
-EnvironmentVars:PHPRC:"C:\Some\Directory\"
]]>
</programlisting>
</example>
</para>
</sect3>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,387 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.iis7" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Microsoft IIS 7.0 and later</title>
<para>
This section contains instructions for manually setting up Internet Information
Services (IIS) 7.0 and later to work with PHP on Microsoft Windows Vista SP1,
Windows 7, Windows Server 2008 and Windows Server 2008 R2. For instructions
on setting up IIS 5.1 and IIS 6.0 on Windows XP and Windows Server 2003 refer to
<link linkend="install.windows.legacy.iis6">Microsoft IIS 5.1 and IIS 6.0</link>.
</para>
<sect3 xml:id="install.windows.legacy.iis7.fastcgi.enable">
<title>Enabling FastCGI support in IIS</title>
<para>
FastCGI module is disabled in default installation of IIS. The steps to enable it differ
based on the version of Windows being used.
</para>
<para>
To enable FastCGI support on Windows Vista SP1 and Windows 7:
<procedure>
<step>
<simpara>
In the Windows Start Menu choose &quot;Run:&quot;, type &quot;optionalfeatures.exe&quot;
and click &quot;Ok&quot;;
</simpara>
</step>
<step>
<simpara>
In the &quot;Windows Features&quot; dialog expand &quot;Internet Information
Services&quot;, &quot;World Wide Web Services&quot;, &quot;Application Development
Features&quot; and then enable the &quot;CGI&quot; checkbox;
</simpara>
</step>
<step>
<simpara>
Click OK and wait until the installation is complete.
</simpara>
</step>
</procedure>
<mediaobject>
<alt>Enabling FastCGI support for IIS7 on Windows Vista SP1 and Windows 7</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis7vistacgi.png" />
</imageobject>
</mediaobject>
</para>
<para>
To enable FastCGI support on Windows Server 2008 and Windows Server 2008 R2:
<procedure>
<step>
<simpara>
In the Windows Start Menu choose &quot;Run:&quot;, type &quot;CompMgmtLauncher&quot;
and click &quot;Ok&quot;;
</simpara>
</step>
<step>
<simpara>
If the &quot;Web Server (IIS)&quot; role is not present under the &quot;Roles&quot;
node, then add it by clicking &quot;Add Roles&quot;;
</simpara>
</step>
<step>
<simpara>
If the &quot;Web Server (IIS)&quot; role is present, then click &quot;Add Role Services&quot;
and then enable the &quot;CGI&quot; checkbox under &quot;Application Development&quot; group;
</simpara>
</step>
<step>
<simpara>
Click &quot;Next&quot; and then &quot;Install&quot; and wait for the installation to complete.
</simpara>
</step>
</procedure>
<mediaobject>
<alt>Enabling FastCGI support on Windows Server 2008 and Windows Server 2008 R2</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis7w2k8cgi.png" />
</imageobject>
</mediaobject>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.fastcgi.conf">
<title>Configuring IIS to process PHP requests</title>
<para>
Download and install PHP in accordance to the instructions described in
<link linkend="install.windows.legacy.manual">manual installation steps</link>
<note>
<para>
Non-thread-safe build of PHP is recommended when using IIS. The non-thread-safe
builds are available at <link xlink:href="&url.php.win.downloads;">PHP for Windows:
Binaries and Sources Releases.</link>
</para>
</note>
</para>
<para>
Configure the CGI- and FastCGI-specific settings in <filename>php.ini</filename> file as shown below:
<example>
<title>CGI and FastCGI settings in <filename>php.ini</filename></title>
<programlisting role="ini">
<![CDATA[
fastcgi.impersonate = 1
fastcgi.logging = 0
cgi.fix_pathinfo=1
cgi.force_redirect = 0
]]>
</programlisting>
</example>
</para>
<para>
Configure IIS handler mapping for PHP by using either IIS Manager user interface or a command line tool.
</para>
<sect4 xml:id="install.windows.legacy.iis7.fastcgi.conf.ui">
<title>Using IIS Manager user interface to create a handler mapping for PHP</title>
<para>
Follow these steps to create an IIS handler mapping for PHP in IIS Manager user interface:
<procedure>
<step>
<simpara>In the Windows Start Menu choose &quot;Run:&quot;, type &quot;inetmgr&quot; and click &quot;Ok&quot;;</simpara>
</step>
<step>
<simpara>In the IIS Manager user interface select the server node in the &quot;Connections&quot; tree view;</simpara>
</step>
<step>
<para>
In the &quot;Features View&quot; page open the &quot;Handler Mappings&quot; feature;
<mediaobject>
<alt>Create IIS handler mapping for PHP : Locate Handler Mappings</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis7handlericon.png" />
</imageobject>
</mediaobject>
</para>
</step>
<step>
<simpara>In the &quot;Actions&quot; pane click &quot;Add Module Mapping...&quot;;</simpara>
</step>
<step>
<para>
In the &quot;Add Module Mapping&quot; dialog enter the following:
<itemizedlist spacing="compact">
<listitem>
<simpara>Request path: *.php</simpara>
</listitem>
<listitem>
<simpara>Module: FastCgiModule</simpara>
</listitem>
<listitem>
<simpara>Executable: C:\[Path to PHP installation]\php-cgi.exe</simpara>
</listitem>
<listitem>
<simpara>Name: PHP_via_FastCGI</simpara>
</listitem>
</itemizedlist>
</para>
</step>
<step>
<simpara>
Click &quot;Request Restrictions&quot; button and then configure the mapping to invoke handler
only if request is mapped to a file or a folder;
</simpara>
</step>
<step>
<simpara>Click OK on all the dialogs to save the configuration.</simpara>
</step>
</procedure>
<mediaobject>
<alt>Create IIS handler mapping for PHP : Add Handler Mapping</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis7handlermap.png" />
</imageobject>
</mediaobject>
</para>
</sect4>
<sect4 xml:id="install.windows.legacy.iis7.fastcgi.conf.cmd">
<title>Using command line tool to create a handler mapping for PHP</title>
<para>
Use the command shown below to create an IIS FastCGI process pool which will use <filename>php-cgi.exe</filename>
executable for processing PHP requests. Replace the value of the <varname>fullPath</varname> parameter with the
absolute file path to the <filename>php-cgi.exe</filename> file.
<example>
<title>Creating IIS FastCGI process pool</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI ^
/+[fullPath='c:\PHP\php-cgi.exe']
]]>
</programlisting>
</example>
</para>
<para>
Configure IIS to handle PHP specific requests by running the command shown below. Replace the value of the
<varname>scriptProcessor</varname> parameter with the absolute file path to the <filename>php-cgi.exe</filename> file.
<example>
<title>Creating handler mapping for PHP requests</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers ^
/+[name='PHP_via_FastCGI', path='*.php',verb='*',modules='FastCgiModule',^
scriptProcessor='c:\PHP\php-cgi.exe',resourceType='Either']
]]>
</programlisting>
</example>
</para>
<para>
This command creates an IIS handler mapping for *.php file extension, which will result in all URLs that
end with .php being handled by FastCGI module.
<note>
<para>
At this point the required installation and configuration steps are completed. The remaining
instructions below are optional but highly recommended for achieving optimal functionality
and performance of PHP on IIS.
</para>
</note>
</para>
</sect4>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.impersonation">
<title>Impersonation and file system access</title>
<para>
It is recommended to enable FastCGI impersonation in PHP when using IIS. This
is controlled by the <varname>fastcgi.impersonate</varname> directive in <filename>php.ini</filename>
file. When impersonation is enabled, PHP will perform all the file system operations on behalf of
the user account that has been determined by IIS authentication. This ensures that even if the
same PHP process is shared across different IIS web sites, the PHP scripts in those web sites
will not be able to access each other&#39;s files as long as different user accounts are used
for IIS authentication on each web site.
</para>
<para>
For example IIS 7, in its default configuration, has anonymous authentication enabled with
built-in user account IUSR used as a default identity. This means that in order for IIS to
execute PHP scripts, it is necessary to grant IUSR account read permission on those scripts.
If PHP applications need to perform write operations on certain files or write files into some
folders then IUSR account should have write permission to those.
</para>
<para>
To determine what user account is used as an anonymous identity in IIS 7 use the following command.
Replace the &quot;Default Web Site&quot; with the name of IIS web site that you use. In the output
XML configuration element look for the <varname>userName</varname> attribute.
<example>
<title>Determining the account used as IIS anonymous identity</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd.exe list config "Default Web Site" ^
/section:anonymousAuthentication
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" userName="IUSR" />
</authentication>
</security>
</system.webServer>
]]>
</programlisting>
</example>
<note>
<para>
If <varname>userName</varname> attribute is not present in the <varname>anonymousAuthentication</varname> element,
or is set to an empty string, then it means that the application pool identity is used as an
anonymous identity for that web site.
</para>
</note>
</para>
<para>
To modify the permissions settings on files and folders, use the Windows Explorer
user interface or <varname>icacls</varname> command.
<example>
<title>Configuring file access permissions</title>
<programlisting>
<![CDATA[
icacls C:\inetpub\wwwroot\upload /grant IUSR:(OI)(CI)(M)
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.defaultdoc">
<title>Set <filename>index.php</filename> as a default document in IIS</title>
<para>
The IIS default documents are used for HTTP requests that do not specify a
document name. With PHP applications, <filename>index.php</filename> usually
acts as a default document. To add <filename>index.php</filename> to the list
of IIS default documents, use this command:
<example>
<title>Set <filename>index.php</filename> as a default document in IIS</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd.exe set config ^
-section:system.webServer/defaultDocument /+"files.[value='index.php']" ^
/commit:apphost
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.recycling">
<title>FastCGI and PHP Recycling configuration</title>
<para>
Configure IIS FastCGI settings for recycling of PHP processes by using the commands shown below.
The FastCGI setting <varname>instanceMaxRequests</varname> controls how many requests will be
processed by a single <filename>php-cgi.exe</filename> process before IIS shuts it down.
The PHP environment variable <varname>PHP_FCGI_MAX_REQUESTS</varname> controls how many
requests a single <filename>php-cgi.exe</filename> process will handle before it recycles
itself. Make sure that the value specified for FastCGI <varname>InstanceMaxRequests</varname>
setting is less than or equal to the value specified for <varname>PHP_FCGI_MAX_REQUESTS</varname>.
<example>
<title>Configuring FastCGI and PHP recycling</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi ^
/[fullPath='c:\php\php-cgi.exe'].instanceMaxRequests:10000
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi ^
/+"[fullPath='C:\{php_folder}\php-cgi.exe'].environmentVariables.^
[name='PHP_FCGI_MAX_REQUESTS',value='10000']"
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.timeouts">
<title>FastCGI timeout settings</title>
<para>
Increase the timeout settings for FastCGI if it is expected to have long running PHP scripts.
The two settings that control timeouts are <varname>activityTimeout</varname> and
<varname>requestTimeout</varname>. Use the commands below to change the timeout settings.
Make sure to replace the value in the <varname>fullPath</varname> parameter to
contain the absolute path to the <filename>php-cgi.exe</filename> file.
<example>
<title>Configuring FastCGI timeout settings</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi ^
/[fullPath='C:\php\php-cgi.exe',arguments=''].activityTimeout:"90" /commit:apphost
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi ^
/[fullPath='C:\php\php-cgi.exe',arguments=''].requestTimeout:"90" /commit:apphost
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.phpinilocation">
<title>Changing the Location of <filename>php.ini</filename> file</title>
<para>
PHP searches for <filename>php.ini</filename> file in
<link linkend="configuration.file">several locations</link> and it is
possible to change the default locations of <filename>php.ini</filename>
file by using <varname>PHPRC</varname> environment variable. To instruct PHP
to load the configuration file from a custom location run the command shown below.
The absolute path to the directory with <filename>php.ini</filename> file should be
specified as a value of <varname>PHPRC</varname> environment variable.
<example>
<title>Changing the location of <filename>php.ini</filename> file</title>
<programlisting>
<![CDATA[
appcmd.exe set config -section:system.webServer/fastCgi ^
/+"[fullPath='C:\php\php.exe',arguments=''].environmentVariables.^
[name='PHPRC',value='C:\Some\Directory\']" /commit:apphost
]]>
</programlisting>
</example>
</para>
</sect3>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.windows.legacy.index" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Installation on old Windows systems</title>
<para>
This section applies to Windows 98/Me and Windows NT/2000/XP/2003. PHP
will not work on 16 bit platforms such as Windows 3.1 and sometimes
we refer to the supported Windows platforms as Win32.
</para>
<note>
<para>
Windows XP/2003 are no longer supported as of PHP 5.5.0.
</para>
</note>
<note>
<para>
Windows 98/Me/NT4/2000 are no longer supported as of PHP 5.3.0.
</para>
</note>
<note>
<para>
Windows 95 is no longer supported as of PHP 4.3.0.
</para>
</note>
<para>
If you have a development environment such as Microsoft Visual Studio, you can also
<!--<link linkend="install.windows.legacy.building">build</link>-->
build PHP from the original source code.
</para>
<para>
Once you have PHP installed on your Windows system, you may also
want to <link linkend="install.windows.legacy.extensions">load various extensions</link>
for added functionality.
</para>
&install.windows.legacy.manual;
&install.windows.legacy.iis;
&install.windows.legacy.iis6;
&install.windows.legacy.iis7;
&install.windows.legacy.apache1;
&install.windows.legacy.apache2;
&install.windows.legacy.sambar;
&install.windows.legacy.xitami;
&install.windows.legacy.building;
&install.windows.legacy.extensions;
&install.windows.legacy.commandline;
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,264 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.manual" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Manual Installation Steps</title>
<para>
This section contains instructions for manually installing and configuring
PHP on Microsoft Windows.
</para>
<sect3 xml:id="install.windows.legacy.manual.download">
<title>Selecting and downloading the PHP distribution package</title>
<para>
Download the PHP zip binary distribution from
<link xlink:href="&url.php.win.downloads;">PHP for Windows: Binaries and Sources</link>.
There are several different versions of the zip package - to choose the right version for you,
follow the detailed guide on the <link xlink:href="&url.php.win.downloads;">download page</link>.
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.manual.package">
<title>The PHP package structure and content</title>
<para>
Unpack the content of the zip archive into a directory of your choice, for
example C:\PHP\. The directory and file structure extracted from the zip will
look as below:
<example>
<title>PHP 5 package structure</title>
<programlisting>
<![CDATA[
c:\php
|
+--dev
| |
| |-php5ts.lib -- php5.lib in non thread safe version
|
+--ext -- extension DLLs for PHP
| |
| |-php_bz2.dll
| |
| |-php_cpdf.dll
| |
| |-...
|
+--extras -- empty
|
+--pear -- initial copy of PEAR
|
|
|-go-pear.bat -- PEAR setup script
|
|-...
|
|-php-cgi.exe -- CGI executable
|
|-php-win.exe -- executes scripts without an opened command prompt
|
|-php.exe -- Command line PHP executable (CLI)
|
|-...
|
|-php.ini-development -- default php.ini settings
|
|-php.ini-production -- recommended php.ini settings
|
|-php5apache2_2.dll -- does not exist in non thread safe version
|
|-php5apache2_2_filter.dll -- does not exist in non thread safe version
|
|-...
|
|-php5ts.dll -- core PHP DLL ( php5.dll in non thread safe version)
|
|-...
]]>
</programlisting>
</example>
</para>
<para>
Below is the list of the modules and executables included in the PHP zip
distribution:
<itemizedlist spacing="compact">
<listitem>
<para>
<filename>go-pear.bat</filename> - the PEAR setup script. Refer to <link xlink:href="&url.pear.installation;">Installation (PEAR)</link>
for more details.
</para>
</listitem>
<listitem>
<para>
<filename>php-cgi.exe</filename> - CGI executable that can be used when running PHP on IIS via CGI or FastCGI.
</para>
</listitem>
<listitem>
<para>
<filename>php-win.exe</filename> - the PHP executable for executing PHP scripts without using a command line window
(for example PHP applications that use Windows GUI).
</para>
</listitem>
<listitem>
<para>
<filename>php.exe</filename> - the PHP executable for executing PHP scripts within a command line interface (CLI).
</para>
</listitem>
<listitem>
<para>
<filename>php5apache2_2.dll</filename> - Apache 2.2.X module.
</para>
</listitem>
<listitem>
<para>
<filename>php5apache2_2_filter.dll</filename> - Apache 2.2.X filter.
</para>
</listitem>
</itemizedlist>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.manual.phpini">
<title>Changing the <filename>php.ini</filename> file</title>
<para>
After the php package content has been extracted, copy the <filename>php.ini-production</filename> into <filename>php.ini</filename>
in the same folder. If necessary, it is also possible to place the <filename>php.ini</filename> into any other location of your choice
but that will require additional configuration steps as described in <link linkend="configuration.file">PHP Configuration</link>.
</para>
<para>
The <filename>php.ini</filename> file tells PHP how to configure itself, and how to work with the
environment that it runs in. Here are a number of settings for the <filename>php.ini</filename> file
that help PHP work better with Windows. Some of these are optional. There are
many other directives that may be relevant to your environment - refer to the
<link linkend="ini.list">list of php.ini directives</link> for more information.
</para>
<para>
Required directives:
<itemizedlist spacing="compact">
<listitem>
<para>
<varname>extension_dir</varname> = <literal>&lt;path to extension directory&gt;</literal> - The <varname>extension_dir</varname> needs
to point to the directory where PHP extensions files are stored. The path can be absolute
(i.e. &quot;C:\PHP\ext&quot;) or relative (i.e. &quot;.\ext&quot;). Extensions that are listed lower in the <filename>php.ini</filename> file need
to be located in the <varname>extension_dir</varname>.
</para>
</listitem>
<listitem>
<para>
<varname>extension</varname> = <literal>xxxxx.dll</literal> - For each extension you wish to enable, you need a corresponding &quot;extension=&quot;
directive that tells PHP which extensions in the <varname>extension_dir</varname> to load at startup time.
</para>
</listitem>
<listitem>
<para>
<varname>log_errors</varname> = <literal>On</literal> - PHP has an error logging facility that can be used to send errors to a file,
or to a service (i.e. syslog) and works in conjunction with the <varname>error_log</varname> directive below. When running under IIS,
the <varname>log_errors</varname> should be enabled, with a valid <varname>error_log</varname>.
</para>
</listitem>
<listitem>
<para>
<varname>error_log</varname> = <literal>&lt;path to the error log file&gt;</literal> - The error_log needs to specify the absolute,
or relative path to the file where PHP errors should be logged. This file needs to be writable for the web server.
The most common places for this file are in various TEMP directories, for example &quot;C:\inetpub\temp\php-errors.log&quot;.
</para>
</listitem>
<listitem>
<para>
<varname>cgi.force_redirect</varname> = <literal>0</literal> - This directive is required for running under IIS.
It is a directory security facility required by many other web servers. However, enabling it under IIS will
cause the PHP engine to fail on Windows.
</para>
</listitem>
<listitem>
<para>
<varname>cgi.fix_pathinfo</varname> = <literal>1</literal> - This lets PHP access real path info following the CGI Spec.
The IIS FastCGI implementation needs this set.
</para>
</listitem>
<listitem>
<para>
<varname>fastcgi.impersonate</varname> = <literal>1</literal> - FastCGI under IIS supports the ability to impersonate
security tokens of the calling client. This allows IIS to define the security context that the request runs under.
</para>
</listitem>
<listitem>
<para>
<varname>fastcgi.logging</varname> = <literal>0</literal> - FastCGI logging should be disabled on IIS. If it is left enabled,
then any messages of any class are treated by FastCGI as error conditions which will cause IIS to generate an HTTP 500 exception.
</para>
</listitem>
</itemizedlist>
</para>
<para>
Optional directives
<itemizedlist spacing="compact">
<listitem>
<para>
<varname>max_execution_time</varname> = <literal>##</literal> - This directive tells PHP the maximum amount of time that it can spend
executing any given script. The default for this is 30 seconds. Increase the value of this directive if PHP application take long time to execute.
</para>
</listitem>
<listitem>
<para>
<varname>memory_limit</varname> = <literal>###M</literal> - The amount of memory available for the PHP process, in Megabytes.
The default is 128, which is fine for most PHP applications. Some of the more complex ones might need more.
</para>
</listitem>
<listitem>
<para>
<varname>display_errors</varname> = <literal>Off</literal> - This directive tells PHP whether to include any error messages in the
stream that it returns to the Web server. If this is set to &quot;On&quot;, then PHP will send whichever classes of errors
that you define with the <varname>error_reporting</varname> directive back to web server as part of the error stream.
For security reasons it is recommended to set it to &quot;Off&quot; on production servers in order not to reveal any
security sensitive information that is often included in the error messages.
</para>
</listitem>
<listitem>
<para>
<varname>open_basedir</varname> = <literal>&lt;paths to directories, separated by semicolon&gt;</literal>, e.g.
openbasedir=&quot;C:\inetpub\wwwroot;C:\inetpub\temp&quot;. This directive specified the directory paths where PHP
is allowed to perform file system operations. Any file operation outside of the specified paths will result in an error.
This directive is especially useful for locking down the PHP installation in shared hosting environments to prevent
PHP scripts from accessing any files outside of the web site's root directory.
</para>
</listitem>
<listitem>
<para>
<varname>upload_max_filesize</varname> = <literal>###M</literal> and <varname>post_max_size</varname> = <literal>###M</literal> -
The maximum allowed size of an uploaded file and post data respectively. The values of these directives should be
increased if PHP applications need to perform large uploads, such as for example photos or video files.
</para>
</listitem>
</itemizedlist>
</para>
<para>
PHP is now setup on your system. The next step is to choose a web
server, and enable it to run PHP. Choose a web server from the table of
contents.
</para>
<para>
In addition to running PHP via a web server, PHP can run from the command
line just like a <literal>.BAT</literal> script. See
<!--<link linkend="install.windows.legacy.commandline">Command Line PHP on Microsoft
Windows</link> for further details.-->
</para>
</sect3>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,87 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.sambar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Sambar Server on Microsoft Windows</title>
<para>
This section contains notes and hints specific to the
<link xlink:href="&url.sambar;">Sambar Server</link> for Windows.
</para>
<note>
<para>
You should read the <link linkend="install.windows.legacy.manual">manual
installation steps</link> first!
</para>
</note>
<simpara>
This list describes how to set up the ISAPI module to
work with the Sambar server on Windows.
</simpara>
<para>
<itemizedlist>
<listitem>
<para>
Find the file called <filename>mappings.ini</filename> (in the config
directory) in the Sambar install directory.
</para>
</listitem>
<listitem>
<para>
Open <filename>mappings.ini</filename> and add the following line
under <literal>[ISAPI]</literal>:
<example>
<title>ISAPI configuration of Sambar</title>
<programlisting>
<![CDATA[
#for PHP 4
*.php = c:\php\php4isapi.dll
#for PHP 5
*.php = c:\php\php5isapi.dll
]]>
</programlisting>
</example>
(This line assumes that PHP was installed in
<filename>c:\php</filename>.)
</para>
</listitem>
<listitem>
<para>
Now restart the Sambar server for the changes to take effect.
</para>
</listitem>
</itemizedlist>
</para>
<note>
<para>
If you intend to use PHP to communicate with resources which are held on
a different computer on your network, then you will need to alter the
account used by the Sambar Server Service. The default account used for
the Sambar Server Service is LocalSystem which will not have access to
remote resources. The account can be amended by using the Services
option from within the Windows Control Panel Administration Tools.
</para>
</note>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,89 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.xitami" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Xitami on Microsoft Windows</title>
<para>
This section contains notes and hints specific to
<link xlink:href="&url.xitami;">Xitami</link> on Windows.
</para>
<note>
<para>
You should read the <link linkend="install.windows.legacy.manual">manual
installation steps</link> first!
</para>
</note>
<simpara>
This list describes how to set up the PHP CGI binary
to work with Xitami on Windows.
</simpara>
<note>
<title>Important for CGI users</title>
<para>
Read the <link linkend="faq.installation.forceredirect">faq
on cgi.force_redirect</link> for important details. This
directive needs to be set to <literal>0</literal>.
If you want to use <literal>$_SERVER['PHP_SELF']</literal> you have to
enable the <link linkend="ini.cgi.fix-pathinfo">cgi.fix_pathinfo</link>
directive.
</para>
</note>
&warn.install.cgi;
<para>
<itemizedlist>
<listitem>
<para>
Make sure the web server is running, and point
your browser to xitamis admin console
(usually <literal>http://127.0.0.1/admin</literal>),
and click on Configuration.
</para>
</listitem>
<listitem>
<para>
Navigate to the Filters, and put the
extension which PHP should parse (i.e. .php)
into the field File extensions (.xxx).
</para>
</listitem>
<listitem>
<para>
In Filter command or script put the path and name
of your PHP CGI executable i.e. <filename>C:\php\php.exe</filename>
for PHP 4, or <filename>C:\php\php-cgi.exe</filename> for PHP 5.
</para>
</listitem>
<listitem>
<para>
Press the 'Save' icon.
</para>
</listitem>
<listitem>
<para>
Restart the server to reflect changes.
</para>
</listitem>
</itemizedlist>
</para>
</sect2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -42,8 +42,6 @@ REM Configure FastCGI Variables
]]>
</programlisting>
</example>
See also the <link linkend="install.windows.legacy.iis7">old IIS installation instructions</link>.
</para>
</sect3>
@ -54,7 +52,6 @@ REM Configure FastCGI Variables
The Apache builds of ApacheLounge are recommended, but other options include XAMPP, WampServer and BitNami, which provide automatic installer tools.
PHP can be used on Apache through mod_php or mod_fastcgi.
mod_php requires a TS build of Apache built with same version of Visual C and same CPU (x86 or x64).
See also the <link linkend="install.windows.legacy.apache2">old Apache installation instructions</link>.
</para>
</sect3>
</sect2>
@ -75,10 +72,10 @@ REM Configure FastCGI Variables
<para>Non-Thread-Safe(NTS) - for IIS and other FastCGI web servers (Apache with mod_fastcgi) and recommended for command-line scripts</para>
</listitem>
<listitem>
<para>x86 - production use of PHP 5.5 and up.</para>
<para>x86 - for 32-bits systems.</para>
</listitem>
<listitem>
<para>x64 - production use of PHP 7 (unless its a 32-bit only version of Windows). PHP 5.5 and 5.6 x64 builds are experimental.</para>
<para>x64 - for 64-bits systems.</para>
</listitem>
</itemizedlist>
</para>

View file

@ -1,87 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.windows.recommended" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Recommended Configuration on Windows systems</title>
<sect2>
<title>Recommended Configuration on Windows systems</title>
<sect2>
<title>OpCache</title>
<para>
Highly Recommended that you enable OpCache. This extension is included with PHP for Windows. It compiles and optimizes PHP scripts and caches them in memory so that they aren't compiled every time the page is loaded.
</para>
<para>
In your php.ini, set
<example>
<title>Recommended OpCache configuration</title>
<screen>
<para>
It is highly recommended to enable OpCache.
This extension is included with PHP for Windows.
It compiles and optimizes PHP scripts and caches them in memory so that
they aren't compiled every time the page is loaded.
</para>
<para>
Set the &php.ini; to:
<example>
<title>Recommended OpCache configuration</title>
<screen>
<![CDATA[
zend_extension=php_opcache.dll
opcache.enable=On
opcache.enable_cli=On
]]>
</screen>
</example>
</screen>
</example>
And restart the web server.
And restart your web server.
For more info, see: <link linkend="opcache.configuration">OpCache Configuration</link>
</para>
</sect2>
<sect2>
For more info, see: <link linkend="opcache.configuration">OpCache Configuration</link>
</para>
</sect2>
<sect2>
<title>WinCache</title>
<para>
It is recommended to use WinCache if using IIS, especially if in a shared
web hosting environment or using networked file storage (NAS).
Note that WinCache is no longer supported as of PHP 8.0.0.
<para>
Recommended that you use WinCache if using IIS, especially if in a shared web hosting environment or using networked file storage (NAS).
All PHP Applications automatically benefit from WinCache's file cache feature. File system operations are cached in memory.
All PHP Applications automatically benefit from WinCache's file cache feature. File system operations are cached in memory.
WinCache also can cache user objects in memory and share them between <varname>php.exe</varname> or <varname>php-cgi.exe</varname> processes (share objects between requests).
WinCache also can cache user objects in memory and share them between <varname>php.exe</varname> or <varname>php-cgi.exe</varname> processes (share objects between requests).
Many major web applications have a plugin or extension or configuration option to make use of the WinCache user object cache.
Many major web applications have a plugin or extension or configuration option to make use of the WinCache user object cache.
If you need high performance, you should use the object cache in your applications.
If you need high performance, you should use the object cache in your applications.
See: <link xlink:href="http://pecl.php.net/package/WinCache">http://pecl.php.net/package/WinCache</link> to download a WinCache DLL (or tgz) to your PHP extensions directory (extensions_dir in your php.ini).
See: <link xlink:href="http://pecl.php.net/package/WinCache">http://pecl.php.net/package/WinCache</link> to download a WinCache DLL (or tgz) to your PHP extensions directory (extensions_dir in your php.ini).
In your php.ini, set
<example>
<title>Recommended WinCache configuration</title>
<screen>
Set the &php.ini; to:
<example>
<title>Recommended WinCache configuration</title>
<screen>
<![CDATA[
extension=php_wincache.dll
wincache.fcenabled=1
wincache.ocenabled=1 ; removed as of wincache 2.0.0.0
]]>
</screen>
</example>
</screen>
</example>
For more info, see:
<link linkend="wincache.configuration">WinCache Configuration</link>
</para>
</sect2>
For more info, see: <link xlink:href="http://php.net/manual/en/wincache.configuration.php">http://php.net/manual/en/wincache.configuration.php</link>
</para>
</sect2>
<sect2>
<title>IIS Configuration</title>
<para>In IIS Manager, Install FastCGI module and add a handler mapping for <varname>`.php`</varname> to the path to <varname>PHP-CGI.exe</varname> (not <varname>PHP.exe</varname>)</para>
<sect2>
<title>IIS Configuration</title>
<para>
You may use the APPCMD command line tool to script IIS configuration.
In IIS Manager, Install FastCGI module and add a handler mapping for
<varname>`.php`</varname> to the path to <varname>PHP-CGI.exe</varname>
(not <varname>PHP.exe</varname>)
</para>
</sect2>
<sect2>
<para>
You may use the APPCMD command line tool to script IIS configuration.
</para>
</sect2>
<sect2>
<title>Database</title>
<para>
You'll probably need a Database Server.
Popular databases provide PHP extensions to use them.
If your web site doesn't get a lot of traffic,
you can run your database server on the same server as your web server.
Many popular database servers run on Windows.
</para>
<para>You'll probably need a Database Server. Popular databases provide PHP extensions to use them. If your web site doesn't get a lot of traffic, you can run your database server on the same server as your web server. Many popular database servers run on Windows.</para>
<para>PHP includes mysqli and pdo_mysql extensions. PHP 5.5 and 5.6 include mysql extension (deprecated in 7.0).</para>
<para>See <link xlink:href="https://dev.mysql.com/downloads/windows/">https://dev.mysql.com/downloads/windows/</link></para>
</sect2>
<para>PHP includes mysqli and pdo_mysql extensions.</para>
<para>
See <link xlink:href="https://dev.mysql.com/downloads/windows/">https://dev.mysql.com/downloads/windows/</link>
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,20 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.windows.tools" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>PHP Installer Tools on Windows</title>
<sect2>
<title>PHP Installer Tools on Windows</title>
<sect2>
<title>PHP Install Tools</title>
<para>
If you want to setup PHP and are using IIS, the easiest way is to use <link xlink:href="https://www.microsoft.com/web/downloads/platform.aspx">Microsoft's Web Platform Installer (WebPI)</link>.
</para>
<para>
If you want to setup PHP and are using IIS,
the easiest way is to use <link xlink:href="https://www.microsoft.com/web/downloads/platform.aspx">Microsoft's Web Platform Installer (WebPI)</link>.
</para>
<para><link xlink:href="https://www.apachefriends.org/index.html">XAMPP</link>, WampServer and BitNami will setup PHP applications for use with Apache on Windows.</para>
<para>Setting up and configuring Nginx on Windows requires a bit more configuration. See the <link xlink:href="https://www.nginx.com/resources/wiki/start/topics/examples/phpfastcgionwindows/">Nginx documentation</link> for additional setup help.</para>
</sect2>
<para>
<link xlink:href="https://www.apachefriends.org/index.html">XAMPP</link>,
WampServer and BitNami will setup PHP applications for use with Apache on Windows.
</para>
<para>
Setting up and configuring Nginx on Windows requires a bit more configuration.
See the <link xlink:href="https://www.nginx.com/resources/wiki/start/topics/examples/phpfastcgionwindows/">Nginx documentation</link>
for additional setup help.
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,25 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.windows.troubleshooting" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Troubleshooting PHP on Windows</title>
<sect2>
<title>Troubleshooting PHP on Windows</title>
<sect2>
<title>Check Temp Directory Permissions</title>
<procedure>
<step>
<para>Right-click temp directory in File Explorer to get the permissions.
</para>
</step>
<step>
<para>For IIS, check that user IIS_User has MODIFY permission. You can get the temporary directory from the configuration or php info.
</para>
</step>
<step>
<para>
Right-click temp directory in File Explorer to get the permissions.
</para>
</step>
<step>
<para>
For IIS, check that user IIS_User has MODIFY permission.
You can get the temporary directory from the configuration or php info.
</para>
</step>
</procedure>
</sect2>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1597,7 +1597,7 @@ this extension is still available within <acronym xmlns="http://docbook.org/ns/d
<!ENTITY pecl.windows.download 'A <acronym xmlns="http://docbook.org/ns/docbook">DLL</acronym> for this
<acronym xmlns="http://docbook.org/ns/docbook">PECL</acronym> extension is currently unavailable. See also the
<link xmlns="http://docbook.org/ns/docbook" linkend="install.windows.legacy.building">building on Windows</link>
<link xmlns="http://docbook.org/ns/docbook" linkend="install.windows.building">building on Windows</link>
section.'>
<!ENTITY pecl.windows.download.avail 'Windows binaries (<acronym xmlns="http://docbook.org/ns/docbook">DLL</acronym> files)