Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 8240

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Manual Installation Steps</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="install.windows.installer.msi.html">Windows Installer (PHP 5.2 and later)</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="install.windows.iis.html">Microsoft IIS</a></div>
 <div class="up"><a href="install.windows.html">Installation on Windows systems</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="install.windows.manual" class="sect1">
    <h2 class="title">Manual Installation Steps</h2>
    <p class="para">
     This section contains instructions for manually installing and configuring 
     PHP on Microsoft Windows. For the instructions on how to use PHP installer to 
     setup and configure PHP and a web server on Windows refer to 
     <a href="install.windows.installer.msi.html" class="link">Windows Installer (PHP 5.2 and later)</a>.
    </p>
    <div class="sect2" id="install.windows.manual.download">
     <h3 class="title">Selecting and downloading the PHP distribution package</h3>
     <p class="para">
      Download the PHP zip binary distribution from 
      <a href="http://windows.php.net/download/" class="link external">&raquo;&nbsp;PHP for Windows: Binaries and Sources</a>. 
      There are several different versions of the zip package - choose the version that is suitable for 
      the web server being used:
      <ul class="itemizedlist">
       <li class="listitem">
        <p class="para">
         If PHP is used with IIS then choose PHP 5.3 <em class="emphasis">VC9 Non Thread Safe</em> or 
         PHP 5.2 <em class="emphasis">VC6 Non Thread Safe</em>;
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         If PHP is used with IIS7 or greater and PHP 5.3+, then the VC9 binaries of PHP should be used.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         If PHP is used with Apache 1 or Apache 2 then choose PHP 5.3 <em class="emphasis">VC6</em> or 
         PHP 5.2 <em class="emphasis">VC6</em>.
        </p>
       </li>
      </ul>
      <blockquote class="note"><p><strong class="note">Note</strong>: 
       <p class="para">
        VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements 
        in performance and stability. The VC9 versions require you to have the 
        <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF" class="link external">&raquo;&nbsp;Microsoft 2008 C++ Runtime (x86)</a> or 
        the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=BD2A6171-E2D6-4230-B809-9A8D7548C1B6" class="link external">&raquo;&nbsp;Microsoft 2008 C++ Runtime (x64)</a> installed.
       </p>
      </p></blockquote>
     </p>
    </div>
    <div class="sect2" id="install.windows.manual.package">
     <h3 class="title">The PHP package structure and content</h3>
     <p class="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:
      <div class="example" id="example-35">
       <p><strong>Example #1 PHP 5 package structure</strong></p>
        <div class="example-contents">
<div class="cdata"><pre>

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)
   | 
   |-...

</pre></div>
       </div>

      </div>
     </p>
     <p class="para">
      Below is the list of the modules and executables included in the PHP zip 
      distribution:
      <ul class="itemizedlist">
       <li class="listitem">
        <p class="para">
         <var class="filename">go-pear.bat</var> - the PEAR setup script. Refer to <a href="http://pear.php.net/manual/en/installation.php" class="link external">&raquo;&nbsp;Installation (PEAR)</a> 
         for more details.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="filename">php-cgi.exe</var> - CGI executable that can be used when running PHP on IIS via CGI or FastCGI.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="filename">php-win.exe</var> - the PHP executable for executing PHP scripts without using a command line window 
         (for example PHP applications that use Windows GUI).
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="filename">php.exe</var> - the PHP executable for executing PHP scripts within a command line interface (CLI).
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="filename">php5apache2_2.dll</var> - Apache 2.2.X module.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="filename">php5apache2_2_filter.dll</var> - Apache 2.2.X filter.
        </p>
       </li>
      </ul>
     </p>
    </div>
    <div class="sect2" id="install.windows.manual.phpini">
     <h3 class="title">Changing the <var class="filename">php.ini</var> file</h3>
     <p class="para">
     After the php package content has been extracted, copy the <var class="filename">php.ini-production</var> into <var class="filename">php.ini</var>
     in the same folder. If necessary, it is also possible to place the <var class="filename">php.ini</var> into any other location of your choice 
     but that will require additional configuration steps as described in <a href="configuration.file.html" class="link">PHP Configuration</a>.
     </p>
     <p class="para">
      The <var class="filename">php.ini</var> 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 <var class="filename">php.ini</var> 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 
      <a href="ini.list.html" class="link">list of php.ini directives</a> for more information.
     </p>
     <p class="para">
      Required directives:
      <ul class="itemizedlist">
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">extension_dir</var></var> = <em>&lt;path to extension directory&gt;</em> - The <var class="varname"><var class="varname">extension_dir</var></var> 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 <var class="filename">php.ini</var> file need 
         to be located in the <var class="varname"><var class="varname">extension_dir</var></var>.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">extension</var></var> = <em>xxxxx.dll</em> - For each extension you wish to enable, you need a corresponding &quot;extension=&quot; 
         directive that tells PHP which extensions in the <var class="varname"><var class="varname">extension_dir</var></var> to load at startup time.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">log_errors</var></var> = <em>On</em> - 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 <var class="varname"><var class="varname">error_log</var></var> directive below. When running under IIS, 
         the <var class="varname"><var class="varname">log_errors</var></var> should be enabled, with a valid <var class="varname"><var class="varname">error_log</var></var>.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">error_log</var></var> = <em>&lt;path to the error log file&gt;</em> - 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;.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">cgi.force_redirect</var></var> = <em>0</em> - 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. 
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">cgi.fix_pathinfo</var></var> = <em>1</em> - This lets PHP access real path info following the CGI Spec. 
         The IIS FastCGI implementation needs this set.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">fastcgi.impersonate</var></var> = <em>1</em> - 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.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">fastcgi.logging</var></var> = <em>0</em> - 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.
        </p>
       </li>
      </ul>
     </p>
     <p class="para">
      Optional directives
      <ul class="itemizedlist">
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">max_execution_time</var></var> = <em>##</em> - 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.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">memory_limit</var></var> = <em>###M</em> - 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.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">display_errors</var></var> = <em>Off</em> - 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 <var class="varname"><var class="varname">error_reporting</var></var> 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.
        </p>
       </li>
       <li class="listitem">
        <p class="para">
         <var class="varname"><var class="varname">open_basedir</var></var> = <em>&lt;paths to directories, separated by semicolon&gt;</em>, 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&#039;s root directory.
        </p>
       </li>
       <li class="listitem">
         <p class="para">
          <var class="varname"><var class="varname">upload_max_filesize</var></var> = <em>###M</em> and <var class="varname"><var class="varname">post_max_size</var></var> = <em>###M</em> - 
          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.
         </p>
        </li>
      </ul>
     </p>
    <p class="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.
    </p>
    <p class="para">
     In addition to running PHP via a web server, PHP can run from the command
     line just like a <em>.BAT</em> script. See
     <a href="install.windows.commandline.html" class="link">Command Line PHP on Microsoft
     Windows</a> for further details.
    </p>
    </div>
   </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="install.windows.installer.msi.html">Windows Installer (PHP 5.2 and later)</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="install.windows.iis.html">Microsoft IIS</a></div>
 <div class="up"><a href="install.windows.html">Installation on Windows systems</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>