diff --git a/chapters/install.windows.xml b/chapters/install.windows.xml index 759623ba30..6b99198af6 100644 --- a/chapters/install.windows.xml +++ b/chapters/install.windows.xml @@ -1,11 +1,11 @@ - + Installation on Windows systems This section applies to Windows 98/Me and Windows NT/2000/XP. PHP will not work on 16 bit platforms such as Windows 3.1 and sometimes - we refer to the supported Windows platforms as Win32. Windows 95 + we refer to the supported Windows platforms as Win32. Windows 95 is no longer supported as of PHP 4.3.0. @@ -29,117 +29,90 @@ Windows InstallShield - The Windows PHP installer available from the downloads page at - &url.php.downloads;, this - installs the CGI versionof PHP + The Windows PHP installer is available from the downloads page at + &url.php.downloads;. This + installs the CGI version of PHP and, for IIS, PWS, and Xitami, configures the web server as well. - Also note, that while the InstallShield installer is an easy way to make + While the InstallShield installer is an easy way to make PHP work, it is restricted in many aspects, as - automatic setup of extensions for example is not supported. The whole - set of supported extensions is only available by downloading the zip - binary distribution. + automatic setup of extensions for example is not supported. The whole set + of supported extensions is only available by downloading the zip binary + distribution. - Install your selected HTTP server on your system - and make sure that it works. + Install your selected HTTP server on your system and + make sure that it works. - Run the executable installer and follow the instructions provided by - the installation wizard. Two types of installation are supported - - standard, which provides sensible defaults for all the settings it - can, and advanced, which asks questions as it goes along. + Run the executable installer and follow the instructions provided by the + installation wizard. Two types of installation are supported - standard, + which provides sensible defaults for all the settings it can, and advanced, + which asks questions as it goes along. - The installation wizard gathers enough information to set up the - &php.ini; file and configure the web server to - use PHP. For IIS and also PWS on NT Workstation, a list of all the - nodes on the server with script map settings is displayed, and you - can choose those nodes to which you wish to add the PHP script - mappings. + The installation wizard gathers enough information to set up the &php.ini; + file and configure the web server to use PHP. For IIS and also PWS on NT + Workstation, a list of all the nodes on the server with script map settings + is displayed, and you can choose those nodes to which you wish to add the + PHP script mappings. - Once the installation has completed the installer will inform you - if you need to restart your system, restart the server, or just - start using PHP. + Once the installation has completed the installer will inform you if you + need to restart your system, restart the server, or just start using PHP. - Be aware, that this setup of PHP is not secure. If you would - like to have a secure PHP setup, you'd better go on the manual - way, and set every option carefully. This automatically working - setup gives you an instantly working PHP installation, but it is - not meant to be used on online servers. + Be aware, that this setup of PHP is not secure. If you would like to have + a secure PHP setup, you'd better go on the manual way, and set every + option carefully. This automatically working setup gives you an instantly + working PHP installation, but it is not meant to be used on online servers. - - + Manual Installation Steps - This install guide will help you manually install and configure - PHP on your Windows webserver. You need to download the - zip binary distribution from the downloads page at - &url.php.downloads;. The - original version of this guide was compiled by &link.bob;, and can be - found at &url.win32install;. + This install guide will help you manually install and configure PHP on your + Windows webserver. The original version of this guide was compiled by + &link.bob;, and can be found at + &url.win32install;. + You need to download the zip binary distribution from the downloads page at + &url.php.downloads;. + - This guide provides manual installation support for: - - - - Personal Web Server 3 and 4 or newer - - - - - Internet Information Server 3 and 4 or newer - - - - - Apache 1.3.x - - - - - OmniHTTPd 2.0b1 and up - - - - - Oreilly Website Pro - - - - - Xitami - - - - - Netscape Enterprise Server, iPlanet - - - - - - PHP 4 for Windows comes in two flavours - a CGI executable (php.exe), - and several SAPI modules (for example: php4isapi.dll). The latter form - is new to PHP 4, and provides significantly improved performance and - some new functionality. There is also a CLI version which is - further described in the - commandline chapter. + PHP 4 for Windows comes in three flavours - a CGI executable (php.exe), a + CLI executable (sapi/php.exe) and some other SAPI modules: + + + php4apache.dll - Apache 1.3.x module + + + php4apache2.dll - Apache 2.0.x module + + + php4isapi.dll - ISAPI Module for ISAPI compliant + webservers like IIS 4.0/PWS 4.0 or newer. + + + php4nsapi.dll - Netscape/iPlanet module + + + The latter form is new to PHP 4, and provides significantly improved + performance and some new functionality. The CLI version is designed to use + PHP for command line scripting. More information about CLI is available in + the chapter about + using PHP from the command line @@ -148,206 +121,284 @@ other server modules such as ASP failing, in older systems. - - If you choose one of the SAPI modules and use Windows 95, be sure - to download the DCOM update from the Microsoft DCOM pages. For the - ISAPI module, an ISAPI 4.0 compliant Web server is required - (tested on IIS 4.0, PWS 4.0 and IIS 5.0). IIS 3.0 is - NOT supported. You should download and - install the Windows NT 4.0 Option Pack with IIS 4.0 if you - want native PHP support. - + + DCOM and MDAC requirements + + If you choose one of the SAPI modules and use + Windows 95, be sure to download and install the DCOM + update from the Microsoft DCOM pages. + If you use Microsoft Windows 9x/NT4 download the + latest version of the Microsoft Data Access Components (MDAC) for your + platform. MDAC is available at &url.mdac;. + + - The following steps should be performed on all installations - before the server specific instructions. + The following steps should be performed on all installations before any + server specific instructions. - Extract the distribution file to a directory of your choice. - c:\php\ is a good start. You probably - do not want to use a path in which spaces are included (for - example: c:\program files\php is not a good idea). Some - web servers will crash if you do. + Extract the distribution file to a directory of your choice, + c:\ is a good start. The zip package expands to a + foldername like php-4.3.1-Win32 which is assumed to + be renamed to php. For the sake of convinience and + to be version independant the following steps assume your extracted + version of PHP lives in c:\php. You might choose + any other location but you probably do not want to use a path in which + spaces are included (for example: + c:\program files\php is not a good idea). Some web + servers will crash if you do. The struture of your directory you + extracted the zip file will look like: - - - You need to ensure that the DLLs which PHP uses can be found. - The precise DLLs involved depend on which web server you use - and whether you want to run PHP as a CGI or as a server module. - php4ts.dll is always used. If you are - using a server module (e.g. ISAPI or Apache) then you will - need the relevant DLL from the sapi - folder. If you are using any PHP extension DLLs then you - will need those as well. To make sure that the DLLs can be - found, you can either copy them to the system directory - (e.g. winnt/system32 or - windows/system) or you can make sure - that they live in the same directory as the main PHP - executable or DLL your web server will use (e.g. - php.exe, php4apache.dll). - + + + + windows system directory + | | + | |-expat.dll + | | + | |-fdftk.dll + | | + | |-... + | + +--extensions -- extension dlls for PHP + | | + | |-php_bz2.dll + | | + | |-php_cpdf.dll + | | + | |-.. + | + +--mibs -- support files for SNMP + | + | + +--openssl -- support files for Openssl + | + | + +--pdf-related -- support files for PDF + | + | + +--sapi -- SAPI dlls + | | + | |-php4apache.dll + | | + | |-php4apache2.dll + | | + | |-php4isapi.dll + | | + | |-.. + | + |-install.txt + | + |-.. + | + |-php.exe -- CGI executable + | + |-.. + | + |-php.ini-dist + | + |-php.ini-recommended + | + |-php4ts.dll -- main dll --> windows system directory + | + |-... + + +]]> + + + + + The CGI binary - C:/php/php.exe -, the CLI binary + - c:\php\cli\php.exe -, and the SAPI modules + - c:\php\sapi\*.dll - rely on the main dll + c:\php\php4ts.dll. You have to make sure, that this + dll can be found by your PHP installation. The search order for this dll + is as follows: + + + The same directory from where php.exe is called. + In case you use a SAPI module the same directory from where your + webserver loads the dll (e.g. php4apache.dll). + + + Any directory in your Windows PATH environment variable. + + + + - The PHP binary, the SAPI modules, and some extensions rely on - external DLLs for execution. Make sure that these DLLs in the - distribution exist in a directory that is in the Windows PATH. - For example, if you enable php_oci8.dll in - &php.ini; then you'll want to make sure the Oracle home directory - can be seen in PATH so PHP can find oci.dll. - - - The best bet to do it is to copy the files below into your - system directory, which is typically: + The best bet is to make php4ts.dll available, + regardless which interface (CGI or SAPI module) you plan to use. To do so, + you have to copy this dll to a directory on your Windows path. The best + place is your windows system directory: c:\windows\system for Windows 9x/ME - c:\winnt\system32 for Windows NT/2000 + c:\winnt\system32 for Windows NT/2000 or + c:\winnt40\system32 for NT/2000 server c:\windows\system32 for Windows XP - The files to copy are: - - - php4ts.dll, if it already exists there, - overwrite it - - - The files in your distribution's 'dlls' directory. - If you have them already installed on your system, overwrite them - only if something doesn't work correctly (Before overwriting them, - it is a good idea to make a backup of them, or move them to - another folder - just in case something goes wrong). - - - - - Download the latest version of the Microsoft Data Access Components - (MDAC) for your platform, especially if you use Microsoft Windows - 9x/NT4. MDAC is available at &url.mdac;. + If you plan to use a SAPI module from c:\php\sapi + and do not like to copy dlls to your Windows system directory, you have + the alternative choice to simply copy php4ts.dll to + the sapi folder of your extracted zip package, + c:\php\sapi. - Copy your chosen ini file (see below) to your - '%WINDOWS%' directory on Windows 9x/Me or to your - '%SYSTEMROOT%' directory under Windows NT/2000/XP - and rename it to &php.ini;. Your - '%WINDOWS%' or '%SYSTEMROOT%' directory is - typically: - - c:\windows for Windows 9x/ME/XP - c:\winnt or c:\winnt40 for NT/2000 servers - - - + The next step is to set up a valid configuration file for PHP, &php.ini;. There are two ini files distributed in the zip file, php.ini-dist and - php.ini-optimized. We advise - you to use php.ini-optimized, - because we optimized the default settings in this - file for performance, and security. The best is to - study all the ini - settings and set every element manually yourself. - If you would like to achieve the best security, then this - is the way for you, although PHP works fine with these - default ini files. + php.ini-recommended. We advise you to use + php.ini-recommended, because we optimized the + default settings in this file for performance, and security. Read this + well documented file carefully and in addition study the + ini settings and set every + element manually yourself. If you would like to achieve the best + security, then this is the way for you, although PHP works fine with + these default ini files. Copy your choosen ini-file to a directory where + PHP is able to find and rename it to &php.ini;. By default PHP searchs + &php.ini; in your Windows directory: + + + On Windows 9x/ME/XP copy your choosen ini file to your + %WINDIR%, which is typically + c:\windows. + + + On Windows NT/2000 copy your choosen ini file to your + %WINDIR% or %SYSTEMROOT%, + which is typically c:\winnt or + c:\winnt40 for NT/2000 servers. + + - - Edit your new &php.ini; file: - - - - You will need to change the 'extension_dir' setting to - point to your php-install-dir, or where you have placed - your php_*.dll files. Please do not - forget the last backslash. ex: - c:\php\extensions\ - - - - - If you are using OmniHTTPd, do not follow the next step. - Set the 'doc_root' to point to your webservers - document_root. For example: c:\apache\htdocs - or c:\webroot - - - - - Choose which extensions you would like to load when PHP - starts. See the section about - Windows - extensions, about how to set up one, and what - is already built in. Note that on a new installation - it is advisable to first get PHP working and tested - without any extensions before enabling them in - &php.ini;. - - - - - On PWS and IIS, you can set the browscap.ini - to point to: - c:\windows\system\inetsrv\browscap.ini on - Windows 9x/Me, - c:\winnt\system32\inetsrv\browscap.ini on - NT/2000, and - c:\windows\system32\inetsrv\browscap.ini - on XP. - - - - - Note that the mibs directory supplied - with the Windows distribution contains support files for - SNMP. This directory should be moved to - DRIVE:\usr\mibs (DRIVE - being the drive where PHP is installed.) - - - - - If you're using NTFS on Windows NT, 2000 or XP, make sure that - the user running the webserver has read permissions to your - &php.ini; (e.g. make it readable by Everyone). - - - - - - - - For PWS give execution permission to the webroot: - - - - Start PWS Web Manager - - - - - Edit Properties of the "Home"-Directory - - - - - Select the "execute"-Checkbox - - - - - - - + + If you're using NTFS on Windows NT, 2000 or XP, make sure that + the user running the webserver has read permissions to your + &php.ini; (e.g. make it readable by Everyone). + + + + The following steps are optional. + + + + Edit your new &php.ini; file. + If you plan to use OmniHTTPd, + do not follow the next step. Set the + doc_root to point to your webservers + document_root. For example: + + + + + + + + + + Choose which extensions you would like to load when PHP starts. See + the section about + Windows extensions, + about how to set up one, and what is already built in. Note that on + a new installation it is advisable to first get PHP working and tested + without any extensions before enabling them in &php.ini;. + + + + + On PWS and IIS, you can set the + browscap configuration setting + to point to: + c:\windows\system\inetsrv\browscap.ini on + Windows 9x/Me, + c:\winnt\system32\inetsrv\browscap.ini on + NT/2000, and + c:\windows\system32\inetsrv\browscap.ini + on XP. + + + + + + Following this instructions you are done with the basic steps to setup PHP + on Windows. The next step is to choose a webserver and enable it to run + PHP. Installation instructions for the following webservers are available: + + + + .. the Windows server family, Personal + Web server (PWS) 3 and 4 or newer; Internet Information Server (IIS) 3 + and 4 or newer. + + + + + .. the Apache servers + Apache 1.3.x, and + Apache 2.x. + + + + + + .. the + Netscape/iPlanet servers. + + + + + + .. the OmniHTTPd server. + + + + + + .. the Oreilly Website Pro server. + + + + + + .. the Sambar server. + + + + + + .. the Xitami server. + + + + @@ -629,7 +680,7 @@ It is possible to do minor customization to the build process by editing - the main/config.win32.h.in file. For example you can + the main/config.win32.h file. For example you can change the builtin extensions, the location of &php.ini; and @@ -661,13 +712,11 @@ Installation of Windows extensions - After installing PHP and a webserver on Windows, you will - probably want to install some extensions for added functionality. - The following table describes some of the extensions available. You - can choose which extensions you would like to load when PHP starts - by uncommenting the: 'extension=php_*.dll' lines in - &php.ini;. You can also load a module dynamically - in your script using dl. + After installing PHP and a webserver 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 + dl. The DLLs for PHP extensions are prefixed with 'php_' in PHP 4 (and @@ -676,50 +725,91 @@ - In PHP 4.3.1 BCMath, Calendar, COM, Ctype, FTP, MySQL, ODBC, Overload, - PCRE, Session, Tokenizer, WDDX, XML and Zlib support is built in. - You don't need to load any additional extensions in order to - use these functions. See your distributions - README.txt or install.txt - for a list of built in modules. - - - - - - Some of these extensions need extra DLLs to work. Couple of them can be - found in the distribution package, in the 'dlls' folder but - some, for example Oracle (php_oci8.dll) require DLLs which are - not bundled with the distribution package. - - - - Copy the bundled DLLs from 'DLLs' folder to your Windows - PATH, safe places are: - - c:\windows\system for Windows 9x/Me - c:\winnt\system32 for Windows NT/2000 - c:\windows\system32 for Windows XP - - If you have them already installed on your system, overwrite them - only if something doesn't work correctly (Before overwriting them, - it is a good idea to make a backup of them, or move them to - another folder - just in case something goes wrong). + In PHP 4.3.1 BCMath, Calendar, COM, Ctype, FTP, MySQL, ODBC, Overload, + PCRE, Session, Tokenizer, WDDX, XML and Zlib support is + built in. You don't need to load any additional + extensions in order to use these functions. See your distributions + README.txt or install.txt + or this table + for a list of built in modules. - - PHP Extensions - - - - Extension - Description - Notes - - - + Edit your &php.ini; file: + + + + You will need to change the + extension_dir setting to + point to the directory where your extensions lives, or where you have + placed your php_*.dll files. Please do not + forget the last backslash. For example: + + + + + + + + + + Enable the extension(s) in &php.ini; you want to use by uncommenting the + 'extension=php_*.dll' lines in &php.ini;. This is done by deleting the + leading ; form the extension you want to load. + + enable <link linkend="ref.bzip2">Bzip2</link> extension + + + + + + + + + Some of the extensions need extra DLLs to work. Couple of them can be + found in the distribution package, in the + c:\php\dlls\ folder but some, for example Oracle + (php_oci8.dll) require DLLs which are not bundled + with the distribution package. Copy the bundled DLLs from + c:\php\dlls folder to your Windows PATH, safe + places are: + + c:\windows\system for Windows 9x/Me + c:\winnt\system32 for Windows NT/2000 + c:\windows\system32 for Windows XP + + If you have them already installed on your system, overwrite them only + if something doesn't work correctly (Before overwriting them, it is a + good idea to make a backup of them, or move them to another folder - + just in case something goes wrong). + + + + + + + The following table describes some of the extensions available and required + additional dlls. +
+ PHP Extensions + + + + Extension + Description + Notes + + + php_bz2.dll bzip2 compression functions