mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Reverse merged revision(s) 339219-339218 from phpdoc/en/trunk:
revamping the Windows install instructions for modern PHP and modern Windows versions. ........ These commits break the doc build. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339222 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
ce2780985e
commit
5ed947df17
7 changed files with 48 additions and 234 deletions
|
@ -1,43 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<sect1 xml:id="install.cloud.azure" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Azure App Services</title>
|
||||
<title>Microsoft Azure</title>
|
||||
<para>
|
||||
PHP is frequently used on Azure App Services (aka Microsoft Azure, Windows Azure, Azure Web Apps).
|
||||
PHP installs on the <link xlink:href="&url.cloud.azure;">Azure cloud platform</link>.
|
||||
</para>
|
||||
<para>
|
||||
Azure App Services manages pools of Windows Web Servers to host your web application, as an alternative to managing your own web server on your own Azure Compute VMs or other servers.</para>
|
||||
|
||||
<para>PHP is already enabled for your Azure App Services web site automatically. In the Azure Portal, select your web site, and you can choose which version of PHP to use. You may want to choose a newer version than the default.
|
||||
See also the <link xlink:href="&url.cloud.azure.sdk;">Azure SDK for PHP</link>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As such, PHP and extensions will run on Azure App Services just as it will on other Windows servers.
|
||||
|
||||
Much of the knowledgebase is also portable, so see the <link linkend="install.windows.troubleshooting">Windows Troubleshooting Page</link> too.
|
||||
|
||||
However, the management interface for Azure App Services is different:
|
||||
</para>
|
||||
|
||||
<para>Azure portal: create, edit settings and delete web sites. <link href="https://portal.azure.com/">Azure Portal</link></para>
|
||||
<para>Kudu Dashboard: [your web site name].azurewebsites.net Then, the Kudu dashboard is https://[your web site name].scm.azurewebsites.net/. The Dashboard gives you access to some debugging capabilities, file management and site extensions. Site extensions are an Azure mechanism to add extra programs, like PHP preview builds, to your web site.
|
||||
</para>
|
||||
|
||||
<para>You can not use IIS Manager, Server Manager, or RDP.</para>
|
||||
|
||||
<para>There is also a PHP SDK for programmatically using many Azure Services from your PHP code. See <link xlink:href="https://github.com/Azure/azure-sdk-for-php">Azure SDK for PHP</link>.
|
||||
</para>
|
||||
|
||||
<h2>WinCache</h2>
|
||||
<para>WinCache is enabled by default on Azure App Services and it is recommended that you leave it enabled.
|
||||
|
||||
If you install your own build of PHP, you should enable WinCache on that too.
|
||||
</para>
|
||||
|
||||
<h2>Custom PHP Build</h2>
|
||||
<para>You may upload your own PHP build to your D:\Home (C:\ is NOT writable). Then in the Azure Portal, set SCRIPT_PROCESSOR for .php to the absolute path to php-cgi.exe file in your build.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
|
@ -1,76 +1,51 @@
|
|||
<?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>
|
||||
<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.iis">Legacy Info</link> section.
|
||||
</para>
|
||||
</note>
|
||||
<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 href="https://wiki.php.net/internals/windows/stepbystepbuild">Step by Step Build Instructions</link>.
|
||||
</para>
|
||||
|
||||
<link linkend="install.windows.commandline">Using PHP on Windows Command line</link>
|
||||
|
||||
<link linkend="install.windows.tools">Install Tools</link>
|
||||
|
||||
<link linkend="install.windows.manual">Manual Installation</link>
|
||||
|
||||
<link linkend="install.cloud.azure">Installing PHP on Azure App Services</link> (aka Microsoft Azure, Windows Azure, or (Windows) Web Apps).
|
||||
|
||||
|
||||
<h2>Install Requirements</h2>
|
||||
|
||||
<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).</para>
|
||||
|
||||
<para>PHP requires the Visual C runtime(CRT). Many applications require that so it may already be installed.
|
||||
|
||||
PHP 5.4, 5.5, 5.6 requires VC CRT 11 (Visual Studio 2012). See: https://www.microsoft.com/en-us/download/details.aspx?id=30679
|
||||
|
||||
PHP 7.0+ requires VC CRT 14 (Visual Studio 2015). See: https://www.microsoft.com/en-us/download/details.aspx?id=48145
|
||||
|
||||
You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds.
|
||||
|
||||
If CRT is already installed, the installer will tell you that and not change anything.
|
||||
|
||||
The CRT installer supports the /quiet and /norestart command-line switches, so you can script running it.
|
||||
|
||||
VC11 CRT DLLs can be copied from your local machine to a remote machine(`Copy Deployment` installation) instead of running the installer on the remote machine (such as a web server you have restricted access to). See: http://www.sitepoint.com/install-php53-windows/
|
||||
|
||||
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>
|
||||
|
||||
<link linkend="install.windows.recommended">Recommended Configuration</link>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>PECL</h2>
|
||||
|
||||
<para>PECL extensions are pre-built for Windows and available from: <link href="http://windows.php.net/downloads/pecl/releases/">http://windows.php.net/downloads/pecl/releases/</link>
|
||||
|
||||
<!-- $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>
|
||||
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.building">build</link>
|
||||
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.extensions">load various extensions</link>
|
||||
for added functionality.
|
||||
</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>
|
||||
|
||||
|
||||
<link linkend="install.windows.troubleshooting">Troubleshooting Common Problems</link>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</chapter>
|
||||
&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.sun;
|
||||
&install.windows.legacy.sambar;
|
||||
&install.windows.legacy.xitami;
|
||||
&install.windows.legacy.building;
|
||||
&install.windows.legacy.extensions;
|
||||
&install.windows.legacy.commandline;
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
|
@ -6,11 +6,6 @@
|
|||
This section contains notes and hints specific to getting PHP running
|
||||
from the command line for Windows.
|
||||
</para>
|
||||
<para>
|
||||
To get to the command line interface(CLI) on Windows, click/press Start and either search for Command Prompt, or click run and type cmd.exe and press enter.
|
||||
|
||||
The Windows Command prompt lets you run PHP just like you would with Bash on Linux/UNIX. Other programs or commands are different than on Bash though.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
You should read the <link linkend="install.windows.manual">manual
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<chapter xml:id="install.windows.manual" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Manual PHP Installation on Windows</title>
|
||||
|
||||
<h2>Choose Web Server</h2>
|
||||
<para>
|
||||
IIS is builtin to Windows.
|
||||
|
||||
On Windows Server, use Server Manager to add the IIS role. Be sure to include the CGI Role Feature.
|
||||
|
||||
On Windows Desktop, use Control Panel's Add/Remove Programs to add IIS. See: https://msdn.microsoft.com/en-us/library/ms181052%28v=vs.80%29.aspx?f=255&MSPPError=-2147217396
|
||||
|
||||
For desktop web apps and web-development, you can also use IIS/Express or PHP Desktop
|
||||
|
||||
<link linkend="install.windows.legacy.iis7">How to manually configure IIS</link>
|
||||
|
||||
There are several builds of Apache2 for Windows.
|
||||
|
||||
We support ApacheLounge, but other options include XAMPP, WampServer and BitNami, which provide automatic installer tools.
|
||||
|
||||
You may use mod_php or mod_fastcgi to load PHP on Apache.
|
||||
|
||||
If you use mod_php, you MUST use a TS build of Apache built with same version of Visual C and same CPU (x86 or x64).
|
||||
|
||||
<link linkend="install.windows.legacy.apache2">How to manually configure Apache2</link>
|
||||
|
||||
</para>
|
||||
|
||||
<h2>Choose Build</h2>
|
||||
<para>
|
||||
Download PHP production releases from <link href="http://windows.php.net/downloads/release/">http://windows.php.net/downloads/release/</link>.
|
||||
|
||||
A lot of testing and optimization is already done on the snapshot and qa releases, but you are welcome to help us do more.
|
||||
|
||||
There are 4 types of PHP builds:
|
||||
Thread-Safe(TS) - use for single process web serves, like Apache with mod_php
|
||||
Non-Thread-Safe(NTS) - use for IIS and other FastCGI web servers (Apache with mod_fastcgi) and recommended for command-line scripts
|
||||
x86 - production use of PHP 5.5 or 5.6 or 7.0.
|
||||
x64 - production use of PHP 7.0+ unless its a 32-bit only version of Windows. 5.5 and 5.6 x64 are expiremental.
|
||||
</para>
|
||||
</chapter>
|
|
@ -1,58 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<chapter 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>
|
||||
|
||||
<h3>OpCache</h3>
|
||||
|
||||
<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 zend_extension=php_opcache.dll opcache.enable=On opcache.cli_anble=On
|
||||
|
||||
And restart your web server.
|
||||
|
||||
For more info, see: http://php.net/manual/en/opcache.configuration.php
|
||||
</para>
|
||||
|
||||
<h3>WinCache</h3>
|
||||
|
||||
<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.
|
||||
|
||||
WinCache also can cache user objects in memory and share them between php.exe or php-cgi.exe 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.
|
||||
|
||||
If you need high performance, you should use the object cache in your applications.
|
||||
|
||||
See: http://pecl.php.net/package/WinCache to download a WinCache DLL (or tgz) to your PHP extensions directory (extensions_dir in your php.ini).
|
||||
|
||||
In your php.ini, set extension=php_wincache.dll wincache.fcenabled=1 wincache.ocenabled=1
|
||||
|
||||
For more info, see: http://php.net/manual/en/wincache.configuration.php
|
||||
</para>
|
||||
|
||||
<h2>IIS Configuration</h2>
|
||||
|
||||
<para>In IIS Manager, Install FastCGI module and add a handler mapping for `.php` to the path to PHP-CGI.exe (not PHP.exe)</para>
|
||||
|
||||
<para>
|
||||
|
||||
You may use the APPCMD command line tool to script IIS configuration. See attached script TODO.
|
||||
|
||||
</para>
|
||||
|
||||
<h2>Database</h2>
|
||||
|
||||
<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 https://dev.mysql.com/downloads/windows/</para>
|
||||
|
||||
</chapter>
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<chapter 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>
|
||||
|
||||
<h1>PHP Install Tools</h1>
|
||||
<para>
|
||||
If you want to setup PHP, some common PHP applications and are using IIS, the easiest way is to use Microsoft's Web Platform Installer (WebPI).
|
||||
</para>
|
||||
|
||||
<para>XAMPP, WampServer and BitNami will setup PHP applications for use with Apache on Windows.</para>
|
||||
|
||||
</chapter>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<chapter 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>
|
||||
|
||||
<h3>Check Temp Directory Permissions</h3>
|
||||
|
||||
<para>Right-click temp directory in File Explorer to get the permissions. For IIS, check that user IIS_User has MODIFY permission. You can get the temporary directory from the configuration or php info.
|
||||
</para>
|
||||
</chapter>
|
Loading…
Reference in a new issue