⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.txt

📁 php5.0原代码
💻 TXT
📖 第 1 页 / 共 5 页
字号:

Installing PHP
     _________________________________________________________________

   Table of Contents
   1. General Installation Considerations
   2. Installation on Windows systems

        Windows Installer
        Manual Installation Steps
        ActiveScript
        Microsoft IIS / PWS
        Apache 1.3.x on Microsft Windows
        Apache 2.0.x on Microsoft Windows
        Sun, iPlanet and Netscape servers on Microsoft Windows
        OmniHTTPd Server
        Sambar Server on Microsoft Windows
        Xitami on Microsoft Windows
        Installation of extensions on Windows

   3. Problems?

        Read the FAQ
        Other problems
        Bug reports

   4. Runtime Configuration

        The configuration file
        How to change configuration settings
     _________________________________________________________________

Chapter 1. General Installation Considerations

   Before starting the installation, first you need to know what do you
   want to use PHP for. There are three main fields you can use PHP, as
   described in the What can PHP do? section:

     * Server-side scripting
     * Command line scripting
     * Client-side GUI applications

   For the first and most common form, you need three things: PHP itself,
   a web server and a web browser. You probably already have a web
   browser, and depending on your operating system setup, you may also
   have a web server (e.g. Apache on Linux and MacOS X; IIS on Windows).
   You may also rent webspace at a company. This way, you don't need to
   set up anything on your own, only write your PHP scripts, upload it to
   the server you rent, and see the results in your browser.

   While setting up the server and PHP on your own, you have two choices
   for the method of connecting PHP to the server. For many servers PHP
   has a direct module interface (also called SAPI). These servers
   include Apache, Microsoft Internet Information Server, Netscape and
   iPlanet servers. Many other servers have support for ISAPI, the
   Microsoft module interface (OmniHTTPd for example). If PHP has no
   module support for your web server, you can always use it as a CGI or
   FastCGI processor. This means you set up your server to use the CGI
   executable of PHP to process all PHP file requests on the server.

   If you are also interested to use PHP for command line scripting (e.g.
   write scripts autogenerating some images for you offline, or
   processing text files depending on some arguments you pass to them),
   you always need the command line executable. For more information,
   read the section about writing command line PHP applications. In this
   case, you need no server and no browser.

   With PHP you can also write desktop GUI applications using the PHP-GTK
   extension. This is a completely different approach than writing web
   pages, as you do not output any HTML, but manage windows and objects
   within them. For more information about PHP-GTK, please visit the site
   dedicated to this extension. PHP-GTK is not included in the official
   PHP distribution.

   From now on, this section deals with setting up PHP for web servers on
   Unix and Windows with server module interfaces and CGI executables.
   You will also find information on the command line executable in the
   following sections.

   PHP source code and binary distributions for Windows can be found at
   http://www.php.net/downloads.php. We recommend you to choose a mirror
   nearest to you for downloading the distributions.
     _________________________________________________________________

Chapter 2. Installation on Windows systems

   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. Windows 95 is no
   longer supported as of PHP 4.3.0.

   There are two main ways to install PHP for Windows: either manually or
   by using the installer.

   If you have Microsoft Visual Studio, you can also build PHP from the
   original source code.

   Once you have PHP installed on your Windows system, you may also want
   to load various extensions for added functionality.

   Warning

   There are several all-in-one installers over the Internet, but none of
   those are endorsed by PHP.net, as we believe that the manual
   installation is the best choice to have your system secure and
   optimised.
     _________________________________________________________________

Windows Installer

   The Windows PHP installer is available from the downloads page at
   http://www.php.net/downloads.php. This installs the CGI version of PHP
   and for IIS, PWS, and Xitami, it configures the web server as well.
   The installer does not include any extra external PHP extensions
   (php_*.dll) as you'll only find those in the Windows Zip Package and
   PECL downloads.

     Note: While the Windows installer is an easy way to make PHP work,
     it is restricted in many aspects as, for example, the automatic
     setup of extensions is not supported. Use of the installer isn't
     the preferred method for installing PHP.

   First, install your selected HTTP (web) 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.

   The installation wizard gathers enough information to set up the
   php.ini file, and configure certain web servers to use PHP. With IIS
   or PWS on a 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. One of the web servers
   the PHP installer does not configure for is Apache, so you'll need to
   configure it manually.

   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.

   Warning

   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
   with a web server on Microsoft Windows. To get started you'll need to
   download the zip binary distribution from the downloads page at
   http://www.php.net/downloads.php.

   Although there are many all-in-one installation kits, and we also
   distribute a PHP installer for Microsoft Windows, we recommend you
   take the time to setup PHP yourself as this will provide you with a
   better understanding of the system, and enables you to install PHP
   extensions easily when needed.

     Upgrading from a previous PHP version: Previous editions of the
     manual suggest moving various ini and DLL files into your SYSTEM
     (i.e. C:\WINDOWS) folder and while this simplifies the installation
     procedure it makes upgrading difficult. We advise you remove all of
     these files (like php.ini and PHP related DLLs from the Windows
     SYSTEM folder) before moving on with a new PHP installation. Be
     sure to backup these files as you might break the entire system.
     The old php.ini might be useful in setting up the new PHP as well.
     And as you'll soon learn, the preferred method for installing PHP
     is to keep all PHP related files in one directory and have this
     directory available to your systems PATH.

     MDAC requirements: If you use Microsoft Windows 98/NT4 download the
     latest version of the Microsoft Data Access Components (MDAC) for
     your platform. MDAC is available at
     http://msdn.microsoft.com/data/. This requirement exists because
     ODBC is built into the distributed Windows binaries.

   The following steps should be completed on all installations before
   any server specific instructions are performed:

   Extract the distribution file into a directory of your choice. If you
   are installing PHP 4, extract to C:\, as the zip file expands to a
   foldername like php-4.3.7-Win32. If you are installing PHP 5, extract
   to C:\php as the zip file doesn't expand as in PHP 4. You may choose a
   different location but do not have spaces in the path (like C:\Program
   Files\PHP) as some web servers will crash if you do.

   The directory structure extracted from the zip is different for PHP
   versions 4 and 5 and look like as follows:

   Example 2-1. PHP 4 package structure
c:\php
   |
   +--cli
   |  |
   |  |-php.exe           -- CLI executable - ONLY for commandline scripting
   |
   +--dlls                -- support DLLs required by some extensions
   |  |
   |  |-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 (server module support) DLLs
   |  |
   |  |-php4activescript.dll
   |  |
   |  |-php4apache.dll
   |  |
   |  |-php4apache2.dll
   |  |
   |  |-..
   |
   +--PEAR                -- initial copy of PEAR
   |
   |
   |-go-pear.bat          -- PEAR setup script
   |
   |-..
   |
   |-php.exe              -- CGI executable
   |
   |-..
   |
   |-php.ini-dist         -- default php.ini settings
   |
   |-php.ini-recommended  -- recommended php.ini settings
   |
   |-php4ts.dll           -- core PHP DLL
   |
   |-...

   Or:

   Example 2-2. PHP 5 package structure
c:\php
   |
   +--dev
   |  |
   |  |-php5ts.lib
   |
   +--ext                 -- extension DLLs for PHP
   |  |
   |  |-php_bz2.dll
   |  |
   |  |-php_cpdf.dll
   |  |
   |  |-..
   |
   +--extras
   |  |
   |  +--mibs             -- support files for SNMP
   |  |
   |  +--openssl          -- support files for Openssl
   |  |
   |  +--pdf-related      -- support files for PDF
   |  |
   |  |-mime.magic
   |
   +--pear                -- initial copy of PEAR
   |
   |
   |-go-pear.bat          -- PEAR setup script
   |
   |-fdftk.dll
   |
   |-..
   |

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -