PHP: Windows Installer (PHP 5.2 and later) - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Manual Installation Steps Installation on Windows systems

Last updated: Fri, 26 Jan 2007

view this page in

# Windows Installer (PHP 5.2 and later)

The Windows PHP installer for later versions of PHP is built using MSI technology using the Wix Toolkit (http://wix.sourceforge.net/). It will install and configure PHP and all the built-in and PECL extensions, as well as configure many of the popular web servers such as IIS, Apache, and Xitami.

First, install your selected HTTP (web) server on your system, and make sure that it works. Then proceed with one of the following install types.

## Normal Install

Run the MSI installer and follow the instructions provided by the installation wizard. You will be prompted to select the Web Server you wish to configure first, along with any configuration details needed.

You will then be prompted to select which features and extensions you wish to install and enable. By selecting "Will be installed on local hard drive" in the drop-down menu for each item you can trigger whether to install the feature or not. By selecting "Entire feature will be installed on local hard drive", you will be able to install all sub-features of the included feature ( for example by selecting this options for the feature "PDO" you will install all PDO Drivers ).

Внимание
It is not recommended to install all extensions by default, since many other them require dependencies from outside PHP in order to function properly. Instead, use the Installation Repair Mode that can be triggered thru the 'Add/Remove Programs' control panel to enable or disable extensions and features after installation.

The installer then sets up PHP to be used in Windows and the `php.ini` file, and configures certain web servers to use PHP. The installer will currently configure IIS (CGI mode only), Apache, Xitami, and Sambar Server; if you are using a different web server you'll need to configure it manually.

## Silent Install

The installer also supports a silent mode, which is helpful for Systems Administrators to deploy PHP easily. To use silent mode:

    msiexec.exe /i php-VERSION-win32-install.msi /q

You can control the install directory by passing it as a parameter to the install. For example, to install to e:\php:

    msiexec.exe /i php-VERSION-win32-install.msi /q INSTALLDIR=e:\php

You can also use the same syntax to specify the Apache Configuration Directory (APACHEDIR), the Sambar Server directory (SAMBARDIR), and the Xitami Server directory (XITAMIDIR).

You can also specify what features to install. For example, to install the mysqli extension and the CGI executable:

    msiexec.exe /i php-VERSION-win32-install.msi /q ADDLOCAL=cgi,ext_php_mysqli

The current list of Features to install is as follows:

    MainExecutable - php.exe executable
    ScriptExecutable - php-win.exe executable
    ext_php_* - the various extensions ( for example: ext_php_mysql for MySQL )
    apache13 - Apache 1.3 module
    apache20 - Apache 2.0 module
    apache22 - Apache 2,2 module
    apacheCGI - Apache CGI executable
    iis4ISAPI - IIS 4+ ISAPI module
    iis4CGI - IIS 4+ CGI executable
    pws4 - PWS 4 CGI executable
    iis3 - IIS/PWS 3 CGI executable
    NSAPI - Sun/iPlanet/Netscape server module
    Xitami - Xitami CGI executable
    Sambar - Sambar Server ISAPI module
    CGI - php-cgi.exe executable
    PEAR - PEAR installer
    Manual - PHP Manual in CHM Format

For more information on installing MSI installers from the command line, visit http://msdn.microsoft.com/library/en-us/msi/setup/command_line_options.asp

add a note User Contributed Notes
Windows Installer (PHP 5.2 and later)
jmertic at php dot net
09-Feb-2007 01:02
`Doubling the backslashes also works fine, and this change was included with the installer in 5.2.1. Thanks for your feedback.`
23-Jan-2007 01:01
`The automatic (5.2 Wizard) configuration of Apache 2.2 on Win32 writes the Paths with Backslashes instead of Slashes.
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:\Programme\PHP\"
LoadModule php5_module "C:\Programme\PHP\php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
Apache can't handle this Paths and isn't able to use the correct php.ini
it should look like this:
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/Programme/PHP/"
LoadModule php5_module "C:/Programme/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL`
joe_stone at comcast dot net
15-Dec-2006 03:24
`The instructions should also mention to restart Apache server service in order for changes to take effect.`
add a note
Manual Installation Steps Installation on Windows systems

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 11:33:19 2007 PST