cvs: phpdoc-es /chapters install.windows.xml
| From: | Carlos Bortolini Acurumo | Date: | Mon, 10 May 2004 21:57:07 +0000 |
| Subject: | cvs: phpdoc-es /chapters install.windows.xml | ||
| Groups: | php.doc.es | ||
| Request: | Send a blank email to doc-es+get-584@lists.php.net to get a copy of this message | ||
bortolini Mon May 10 17:57:07 2004 EDT
Added files:
/phpdoc-es/chapters install.windows.xml
Log:
Adicion del archivos de instalacion en sistemas windows.
http://cvs.php.net/co.php/phpdoc-es/chapters/install.windows.xml?r=1.1&p=1 Index: phpdoc-es/chapters/install.windows.xml +++ phpdoc-es/chapters/install.windows.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <sect1 id="install.windows"> <title>Instalación en sistemas Windows</title> <para> Esta sección contiene informació para instalar en los sistemas operativos Windows 98/Me y Windows NT/2000/XP. PHP no trabajará en plataformas de 16 bit tales como Windows 3.1 y a veces nos referimos a plataformas Windows soportadas como Win32. Windows 95 is no longer supported as of PHP 4.3.0. </para> <para> There are two main ways to install PHP for Windows: either <link linkend="install.windows.manual">manually</link> or by using the <link linkend="install.windows.installer">InstallShield</link> installer. </para> <para> If you have Microsoft Visual Studio, you can also <link linkend="install.windows.build">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> <sect2 id="install.windows.installer"> <title>Windows InstallShield</title> <para> The Windows PHP installer is available from the downloads page at <ulink url="&url.php.downloads;">&url.php.downloads;</ulink>. This installs the <emphasis>CGI version</emphasis> of <literal>PHP</literal> and, for IIS, PWS, and Xitami, configures the web server as well. </para> <note> <para> While the InstallShield installer is an easy way to make <literal>PHP</literal> 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. </para> </note> <simpara> Install your selected <acronym>HTTP</acronym> server on your system and make sure that it works. </simpara> <simpara> 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. </simpara> <simpara> 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. </simpara> <simpara> 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. </simpara> <warning> <para> 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. </para> </warning> </sect2> <sect2 id="install.windows.manual"> <title>Manual Installation Steps</title> <simpara> 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 <ulink url="&url.win32install;">&url.win32install;</ulink>. You need to download the zip binary distribution from the downloads page at <ulink url="&url.php.downloads;">&url.php.downloads;</ulink>. </simpara> <para> PHP 4 for Windows comes in three flavours - a CGI executable (php.exe), a CLI executable (sapi/php.exe) and some other SAPI modules: <simplelist> <member> <filename>php4apache.dll</filename> - Apache 1.3.x module </member> <member> <filename>php4apache2.dll</filename> - Apache 2.0.x module </member> <member> <filename>php4isapi.dll</filename> - ISAPI Module for ISAPI compliant webservers like IIS 4.0/PWS 4.0 or newer. </member> <member> <filename>php4nsapi.dll</filename> - Netscape/iPlanet module </member> </simplelist> 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 <link linkend="features.commandline">using PHP from the command line</link> </para> <warning> <simpara> The SAPI modules have been significantly improved in the 4.1 release, however, you may find that you encounter possible server errors or other server modules such as ASP failing, in older systems. </simpara> </warning> <note> <title>DCOM and MDAC requirements</title> <para> If you choose one of the SAPI modules and use <emphasis>Windows 95</emphasis>, be sure to download and install the DCOM update from the <ulink url="&url.dcom.update;">Microsoft DCOM pages</ulink>. If you use Microsoft <emphasis>Windows 9x/NT4</emphasis> download the latest version of the Microsoft Data Access Components (MDAC) for your platform. MDAC is available at <ulink url="&url.mdac;">&url.mdac;</ulink>. </para> </note> <para> The following steps should be performed on all installations before any server specific instructions. <itemizedlist> <listitem> <simpara> Extract the distribution file to a directory of your choice, <filename class="directory">c:\</filename> is a good start. The zip package expands to a foldername like <filename>php-4.3.1-Win32</filename> which is assumed to be renamed to <filename>php</filename>. For the sake of convenience and to be version independent the following steps assume your extracted version of PHP lives in <filename class="directory">c:\php</filename>. You might choose any other location but you probably do not want to use a path in which spaces are included (for example: <filename class="directory">C:\Program Files\PHP</filename> is not a good idea). Some web servers will crash if you do. The structure of your directory you extracted the zip file will look like: </simpara> </listitem> </itemizedlist> <informalexample> <programlisting> <![CDATA[ c:\php | +--cli | | | |-php.exe -- CLI executable - ONLY for commandline scripting | | +--dlls -- support dlls for extensions --> 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 | |-... ]]> </programlisting> </informalexample> </para> <para> The CGI binary - <filename>c:\php\php.exe</filename> -, the CLI binary - <filename>c:\php\cli\php.exe</filename> -, and the SAPI modules - <filename>c:\php\sapi\*.dll</filename> - rely on the main dll <filename>c:\php\php4ts.dll</filename>. You have to make sure, that this dll can be found by your PHP installation. The search order for this dll is as follows: <simplelist> <member> The same directory from where <filename>php.exe</filename> is called. In case you use a SAPI module the same directory from where your webserver loads the dll (e.g. <filename>php4apache.dll</filename>). </member> <member> Any directory in your Windows PATH environment variable. </member> </simplelist> <itemizedlist> <listitem> <para> The best bet is to make <filename>php4ts.dll</filename> 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: <simplelist> <member> <filename class="directory">C:\Windows\System</filename> for Windows 9x/ME </member> <member> <filename class="directory">C:\WINNT\System32</filename> for Windows NT/2000 or <filename class="directory">C:\WINNT40\System32</filename> for NT/2000 server </member> <member> <filename class="directory">C:\Windows\System32</filename> for Windows XP </member> </simplelist> If you plan to use a SAPI module from <filename class="directory">c:\php\sapi</filename> and do not like to copy dlls to your Windows system directory, you have the alternative choice to simply copy <filename>php4ts.dll</filename> to the sapi folder of your extracted zip package, <filename class="directory">c:\php\sapi</filename>. </para> </listitem> <listitem> <para> 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, <filename>php.ini-dist</filename> and <filename>php.ini-recommended</filename>. We advise you to use <filename>php.ini-recommended</filename>, because we optimized the default settings in this file for performance, and security. Read this well documented file carefully and in addition study the <link linkend="configuration.file">ini settings</link> 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 chosen ini-file to a directory where PHP is able to find and rename it to &php.ini;. By default PHP searches &php.ini; in your Windows directory: <simplelist> <member> On Windows 9x/ME/XP copy your chosen ini file to your <filename> %WINDIR%</filename>, which is typically <filename class="directory">C:\Windows</filename>. </member> <member> On Windows NT/2000 copy your chosen ini file to your <filename>%WINDIR%</filename> or <filename>%SYSTEMROOT%</filename>, which is typically <filename class="directory">C:\WINNT</filename> or <filename class="directory">C:\WINNT40</filename> for NT/2000 servers. </member> </simplelist> </para> </listitem> <listitem> <simpara> 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). </simpara> </listitem> </itemizedlist> </para> <para> The following steps are optional. <itemizedlist> <listitem> <para> Edit your new &php.ini; file. If you plan to use <link linkend="install.omnihttpd">OmniHTTPd</link>, do not follow the next step. Set the <link linkend="ini.doc-root">doc_root</link> to point to your webservers document_root. For example: <informalexample> <programlisting role="ini"> <![CDATA[ doc_root = c:\inetpub // for IIS/PWS doc_root = c:\apache\htdocs // for Apache ]]> </programlisting> </informalexample> </para> </listitem> <listitem> <simpara> Choose which extensions you would like to load when PHP starts. See the section about <link linkend="install.windows.extensions">Windows extensions</link>, 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;. </simpara> </listitem> <listitem> <simpara> On PWS and IIS, you can set the <link linkend="ini.browscap">browscap</link> configuration setting to point to: <filename>c:\windows\system\inetsrv\browscap.ini</filename> on Windows 9x/Me, <filename>c:\winnt\system32\inetsrv\browscap.ini</filename> on NT/2000, and <filename>c:\windows\system32\inetsrv\browscap.ini</filename> on XP. </simpara> </listitem> </itemizedlist> </para> <para> 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: <itemizedlist> <listitem> <simpara> .. the <link linkend="install.iis">Windows server family</link>, Personal Web server (PWS) 3 and 4 or newer; Internet Information Server (IIS) 3 and 4 or newer. </simpara> </listitem> <listitem> <simpara> .. the Apache servers <link linkend="install.apache.windows">Apache 1.3.x</link>, and <link linkend="install.apache2.windows">Apache 2.x</link>. </simpara> </listitem> <listitem> <simpara> .. the <link linkend="install.netscape.windows">Netscape/iPlanet</link> servers. </simpara> </listitem> <listitem> <simpara> .. the <link linkend="install.omnihttpd">OmniHTTPd</link> server. </simpara> </listitem> <listitem> <simpara> .. the <link linkend="install.oreilly">Oreilly Website Pro</link> server. </simpara> </listitem> <listitem> <simpara> .. the <link linkend="install.sambar">Sambar</link> server. </simpara> </listitem> <listitem> <simpara> .. the <link linkend="install.xitami">Xitami</link> server. </simpara> </listitem> </itemizedlist> </para> </sect2> <sect2 id="install.windows.build"> <title>Building from source</title> <para> Before getting started, it is worthwhile answering the question: "Why is building on Windows so hard?" Two reasons come to mind: </para> <orderedlist> <listitem> <simpara> Windows does not (yet) enjoy a large community of developers who are willing to freely share their source. As a direct result, the necessary investment in infrastructure required to support such development hasn't been made. By and large, what is available has been made possible by the porting of necessary utilities from Unix. Don't be surprised if some of this heritage shows through from time to time. </simpara> </listitem> <listitem> <simpara> Pretty much all of the instructions that follow are of the "set and forget" variety. So sit back and try follow the instructions below as faithfully as you can. </simpara> </listitem> </orderedlist> <sect3 id="install.windows.build.requirement"> &reftitle.required; <para> To compile and build <literal>PHP</literal> you need a Microsoft Development Environment. Microsoft Visual C++ 6.0 is recommended. To extract the downloaded files you need a extraction utility (e.g.: Winzip). If you don't already have an unzip utility, you can get a free version from <ulink url="&url.infozip;">InfoZip</ulink>. </para> <para> Before you get started, you have to download... </para> <itemizedlist> <listitem> <simpara> ..the win32 buildtools from the <literal>PHP</literal> site at <ulink url="&url.win32.buildtools;">&url.win32.buildtools;</ulink>. </simpara> </listitem> <listitem> <simpara> ..the source code for the DNS name resolver used by <literal>PHP </literal> from <ulink url="&url.win32.dnsresolver;"> &url.win32.dnsresolver;</ulink>. This is a replacement for the <filename>resolv.lib</filename> library included in <filename> win32build.zip</filename>. </simpara> </listitem> <listitem> <simpara> If you plan to compile <literal>PHP</literal> as a Apache module you will also need the <ulink url="&url.apache.source;">Apache sources</ulink>. </simpara> </listitem> </itemizedlist> <simpara> Finally, you are going to need the source to PHP 4 itself. You can get the latest development version using <ulink url="&url.php.anoncvs;"> anonymous CVS</ulink>, a <ulink url="&url.php.snapshots;"> snapshot</ulink> or the most recent released <ulink url="&url.php.downloads;"> source</ulink> tarball. </simpara> </sect3> <sect3 id="install.windows.build.install"> <title>Putting it all together</title> <para> After downloading the required packages you have to extract them in a proper place. <itemizedlist> <listitem> <simpara> Create a working directory where all files end up after extracting, e.g: <filename class="directory">C:\work</filename>. </simpara> </listitem> <listitem> <simpara> Create the directory <filename>win32build</filename> under your working directory (<filename class="directory">C:\work</filename>) and unzip <filename> win32build.zip</filename> into it. </simpara> </listitem> <listitem> <simpara> Create the directory <filename>bindlib_w32</filename> under your working directory (<filename class="directory">C:\work</filename>) and unzip <filename> bindlib_w32.zip</filename> into it. </simpara> </listitem> <listitem> <simpara> Extract the downloaded PHP source code into your working directory (<filename class="directory">C:\work</filename>). </simpara> </listitem> </itemizedlist> Following this steps your directory structure looks like this: <informalexample> <programlisting> <![CDATA[ +--c:\work | | | +--bindlib_w32 | | | | | +--arpa | | | | | +--conf | | | | | +--... | | | +--php-4.x.x | | | | | +--build | | | | | +--... | | | | | +--win32 | | | | | +--... | | | +--win32build | | | | | +--bin | | | | | +--include | | | | | +--lib ]]> </programlisting> </informalexample> Create the directories <filename class="directory">c:\usr\local\lib</filename>. Copy <filename>bison.simple</filename> from <filename class="directory">c:\work\win32build\bin </filename> to <filename class="directory">c:\usr\local\lib</filename>. </para> <note> <simpara> <ulink url="&url.cygwin;">Cygwin</ulink> users may omit the last step. A properly installed Cygwin environment provides the mandatory files <filename>bison.simple</filename> and <filename>bison.exe</filename>. </simpara> </note> </sect3> <sect3 id="install.windows.build.configure"> <title>Configure MVC ++</title> <para> The next step is to configure MVC ++ to prepare for compiling. Launch Microsoft Visual C++, and from the menu select Tools => Options. In the dialog, select the directories tab. Sequentially change the dropdown to Executables, Includes, and Library files. Your entries should look like this: <itemizedlist> <listitem> <simpara> Executable files: <filename class="directory">c:\work\win32build\bin</filename>, Cygwin users: <filename>cygwin\bin</filename> </simpara> </listitem> <listitem> <simpara> Include files: <filename class="directory">c:\work\win32build\include</filename> </simpara> </listitem> <listitem> <simpara> Library files: <filename class="directory">c:\work\win32build\lib</filename> </simpara> </listitem> </itemizedlist> </para> </sect3> <sect3 id="install.windows.build.resolvlib"> <title>Build resolv.lib</title> <para> You must build the <filename>resolv.lib</filename> library. Decide whether you want to have debug symbols available (bindlib - Win32 Debug) or not (bindlib - Win32 Release). Build the appropriate configuration: <itemizedlist> <listitem> <simpara> For GUI users, launch VC++, and then select File => Open Workspace, navigate to <filename class="directory">c:\work\bindlib_w32</filename> and select <filename>bindlib.dsw</filename>. Then select Build=>Set Active Configuration and select the desired configuration. Finally select Build=>Rebuild All. </simpara> </listitem> <listitem> <simpara> For command line users, make sure that you either have the C++ environment variables registered, or have run <command>vcvars.bat</command>, and then execute one of the following commands: </simpara> <itemizedlist> <listitem> <simpara> <userinput>msdev bindlib.dsp /MAKE "bindlib - Win32 Debug"</userinput> </simpara> </listitem> <listitem> <simpara> <userinput>msdev bindlib.dsp /MAKE "bindlib - Win32 Release"</userinput> </simpara> </listitem> </itemizedlist> </listitem> </itemizedlist> At this point, you should have a usable <filename>resolv.lib</filename> in either your <filename class="directory">c:\work\bindlib_w32\Debug</filename> or <filename>Release</filename> subdirectories. Copy this file into your <filename class="directory">c:\work\win32build\lib</filename> directory over the file by the same name found in there. </para> </sect3> <sect3 id="install.windows.build.compile"> <title>Compiling</title> <simpara> The best way to get started is to build the CGI version. </simpara> <itemizedlist> <listitem> <simpara> For GUI users, launch VC++, and then select File => Open Workspace and select <filename>c:\work\php-4.x.x\win32\php4ts.dsw </filename>. Then select Build=>Set Active Configuration and select the desired configuration, either <literal>php4ts - Win32 Debug_TS</literal> or <literal>php4ts - Win32 Release_TS</literal>. Finally select Build=>Rebuild All. </simpara> </listitem> <listitem> <simpara> For command line users, make sure that you either have the C++ environment variables registered, or have run <command>vcvars.bat</command>, and then execute one of the following commands from the <filename class="directory">c:\work\php-4.x.x\win32 </filename> directory: </simpara> <itemizedlist> <listitem> <simpara> <userinput>msdev php4ts.dsp /MAKE "php4ts - Win32 Debug_TS"</userinput> </simpara> </listitem> <listitem> <simpara> <userinput>msdev php4ts.dsp /MAKE "php4ts - Win32 Release_TS"</userinput> </simpara> </listitem> <listitem> <simpara> At this point, you should have a usable <filename>php.exe</filename> in either your <filename class="directory">c:\work\php-4.x.x.\Debug_TS</filename> or <filename>Release_TS</filename> subdirectories. </simpara> </listitem> </itemizedlist> </listitem> </itemizedlist> <simpara> It is possible to do minor customization to the build process by editing the <filename>main/config.win32.h</filename> file. For example you can change the default location of &php.ini;, the built-in extensions, and the default location for your extensions. </simpara> <simpara> Next you may want to build the CLI version which is designed to use <link linkend="features.commandline">PHP from the command line</link>. The steps are the same as for building the CGI version, except you have to select the <literal>php4ts_cli - Win32 Debug_TS</literal> or <literal>php4ts_cli - Win32 Release_TS</literal> project file. After a successful compiling run you will find the <filename>php.exe</filename> in either the directory <filename>Release_TS\cli\</filename> or <filename>Debug_TS\cli\</filename>. </simpara> <note> <simpara> If you want to use PEAR and the comfortable command line installer, the CLI-SAPI is mandatory. For more information about PEAR and the installer read the documentation at the <ulink url="&url.php.pear;manual/"> PEAR</ulink> website. </simpara> </note> <simpara> In order to build the SAPI module (<filename>php4isapi.dll</filename>) for integrating PHP with Microsoft IIS, set your active configuration to <filename>php4isapi-whatever-config</filename> and build the desired dll. </simpara> </sect3> </sect2> <sect2 id="install.windows.extensions"> <title>Installation of Windows extensions</title> <para> 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 <function>dl</function>. </para> <para> The DLLs for PHP extensions are prefixed with 'php_' in PHP 4 (and 'php3_' in PHP 3). This prevents confusion between PHP extensions and their supporting libraries. </para> <note> <para> In PHP 4.3.1 BCMath, Calendar, COM, Ctype, FTP, MySQL, ODBC, Overload, PCRE, Session, Tokenizer, WDDX, XML and Zlib support is <emphasis>built in</emphasis>. You don't need to load any additional extensions in order to use these functions. See your distributions <filename>README.txt</filename> or <filename>install.txt</filename> or <link linkend ="install.extensions.overview">this table</link> for a list of built in modules. </para> </note> <para> The default location <literal>PHP</literal> searches for extensions is <filename class="directory">c:\php4\extensions</filename>. To change this setting to reflect your setup of <literal>PHP</literal> edit your &php.ini; file: <itemizedlist> <listitem> <para> You will need to change the <link linkend ="ini.extension-dir">extension_dir</link> setting to point to the directory where your extensions lives, or where you have placed your <filename>php_*.dll</filename> files. Please do not forget the last backslash. For example: <informalexample> <programlisting role="ini"> <![CDATA[ extension_dir = c:/php/extensions/ ]]> </programlisting> </informalexample> </para> </listitem> <listitem> <para> Enable the extension(s) in &php.ini; you want to use by uncommenting the <literal>extension=php_*.dll</literal> lines in &php.ini;. This is done by deleting the leading ; form the extension you want to load. <example> <title>Enable <link linkend="ref.bzip2">Bzip2</link> extension for PHP-Windows</title> <programlisting role="ini"> <![CDATA[ // change the following line from ... ;extension=php_bz2.dll // ... to extension=php_bz2.dll ]]> </programlisting> </example> </para> </listitem> <listitem> <para> Some of the extensions need extra DLLs to work. Couple of them can be found in the distribution package, in the <filename class="directory">c:\php\dlls\</filename> folder but some, for example Oracle (<filename>php_oci8.dll</filename>) require DLLs which are not bundled with the distribution package. Copy the bundled DLLs from <filename class="directory">c:\php\dlls</filename> folder to your Windows PATH, safe places are: <simplelist> <member>c:\windows\system for Windows 9x/Me</member> <member>c:\winnt\system32 for Windows NT/2000</member> <member>c:\windows\system32 for Windows XP</member> </simplelist> 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). </para> </listitem> </itemizedlist> <note> <simpara> If you are running a server module version of <literal>PHP</literal> remember to restart your webserver to reflect your changes to &php.ini;. </simpara> </note> </para> <para> The following table describes some of the extensions available and required additional dlls. <table id="install.extensions.overview"> <title>PHP Extensions</title> <tgroup cols="3"> <thead> <row> <entry>Extension</entry> <entry>Description</entry> <entry>Notes</entry> </row> </thead> <tbody> <row> <entry>php_bz2.dll</entry> <entry><link linkend="ref.bzip2">bzip2</link> compression functions</entry> <entry>None</entry> </row> <row> <entry>php_calendar.dll</entry> <entry><link linkend="ref.calendar">Calendar</link> conversion functions</entry> <entry>Built in since PHP 4.0.3</entry> </row> <row> <entry>php_cpdf.dll</entry> <entry><link linkend="ref.cpdf">ClibPDF</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_crack.dll</entry> <entry><link linkend="ref.crack">Crack</link> functions</entry> <entry>None</entry> </row> <row> <entry>php3_crypt.dll</entry> <entry>Crypt functions</entry> <entry>unknown</entry> </row> <row> <entry>php_ctype.dll</entry> <entry><link linkend="ref.ctype">ctype</link> family functions</entry> <entry>Built in since PHP 4.3.0</entry> </row> <row> <entry>php_curl.dll</entry> <entry><link linkend="ref.curl">CURL</link>, Client URL library functions</entry> <entry>Requires: <filename>libeay32.dll</filename>, <filename>ssleay32.dll</filename> (bundled)</entry> </row> <row> <entry>php_cybercash.dll</entry> <entry><link linkend="ref.cybercash">Cybercash</link> payment functions</entry> <entry>PHP <= 4.2.0</entry> </row> <row> <entry>php_db.dll</entry> <entry><link linkend="ref.dbm">DBM</link> functions</entry> <entry>Deprecated. Use DBA instead (<filename>php_dba.dll</filename>)</entry> </row> <row> <entry>php_dba.dll</entry> <entry><link linkend="ref.dba">DBA</link>: DataBase (dbm-style) Abstraction layer functions</entry> <entry>None</entry> </row> <row> <entry>php_dbase.dll</entry> <entry><link linkend="ref.dbase">dBase</link> functions</entry> <entry>None</entry> </row> <row> <entry>php3_dbm.dll</entry> <entry>Berkeley DB2 library</entry> <entry>unknown</entry> </row> <row> <entry>php_dbx.dll</entry> <entry><link linkend="ref.dbx">dbx</link> functions</entry> <entry></entry> </row> <row> <entry>php_domxml.dll</entry> <entry><link linkend="ref.domxml">DOM XML</link> functions</entry> <entry> PHP <= 4.2.0 requires: <filename>libxml2.dll</filename> (bundled) PHP >= 4.3.0 requires: <filename>iconv.dll</filename> (bundled) </entry> </row> <row> <entry>php_dotnet.dll</entry> <entry><link linkend="ref.dotnet">.NET</link> functions</entry> <entry>PHP <= 4.1.1</entry> </row> <row> <entry>php_exif.dll</entry> <entry><link linkend="function.read-exif-data">Read EXIF</link> headers from JPEG</entry> <entry>None</entry> </row> <row> <entry>php_fbsql.dll</entry> <entry><link linkend="ref.fbsql">FrontBase</link> functions</entry> <entry>PHP <= 4.2.0</entry> </row> <row> <entry>php_fdf.dll</entry> <entry><link linkend="ref.fdf">FDF</link>: Forms Data Format functions.</entry> <entry>Requires: <filename>fdftk.dll</filename> (bundled)</entry> </row> <row> <entry>php_filepro.dll</entry> <entry><link linkend="ref.filepro">filePro</link> functions</entry> <entry>Read-only access</entry> </row> <row> <entry>php_ftp.dll</entry> <entry><link linkend="ref.ftp">FTP</link> functions</entry> <entry>Built-in since PHP 4.0.3</entry> </row> <row> <entry>php_gd.dll</entry> <entry><link linkend="ref.image">GD</link> library image functions</entry> <entry> Removed in PHP 4.3.2. Also note that truecolor functions are not available in GD1, instead, use <filename>php_gd2.dll</filename>. </entry> </row> <row> <entry>php_gd2.dll</entry> <entry><link linkend="ref.image">GD</link> library image functions</entry> <entry>GD2</entry> </row> <row> <entry>php_gettext.dll</entry> <entry><link linkend="ref.gettext">Gettext</link> functions</entry> <entry> PHP <= 4.2.0 requires <filename>gnu_gettext.dll</filename> (bundled), PHP >= 4.2.3 requires <filename>libintl-1.dll</filename>, <filename>iconv.dll</filename> (bundled). </entry> </row> <row> <entry>php_hyperwave.dll</entry> <entry><link linkend="ref.hw">HyperWave</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_iconv.dll</entry> <entry><link linkend="ref.iconv">ICONV</link> characterset conversion</entry> <entry>Requires: <filename>iconv-1.3.dll</filename> (bundled), PHP >=4.2.1 <filename>iconv.dll</filename></entry> </row> <row> <entry>php_ifx.dll</entry> <entry><link linkend="ref.ifx">Informix</link> functions</entry> <entry>Requires: Informix libraries</entry> </row> <row> <entry>php_iisfunc.dll</entry> <entry>IIS management functions</entry> <entry>None</entry> </row> <row> <entry>php_imap.dll</entry> <entry><link linkend="ref.imap">IMAP</link> POP3 and NNTP functions</entry> <entry>PHP 3: <filename>php3_imap4r1.dll</filename></entry> </row> <row> <entry>php_ingres.dll</entry> <entry><link linkend="ref.ingres">Ingres II</link> functions</entry> <entry>Requires: Ingres II libraries</entry> </row> <row> <entry>php_interbase.dll</entry> <entry><link linkend="ref.ibase">InterBase</link> functions</entry> <entry>Requires: <filename>gds32.dll</filename> (bundled)</entry> </row> <row> <entry>php_java.dll</entry> <entry><link linkend="ref.java">Java</link> functions</entry> <entry>PHP <= 4.0.6 requires: <filename>jvm.dll</filename> (bundled)</entry> </row> <row> <entry>php_ldap.dll</entry> <entry><link linkend="ref.ldap">LDAP</link> functions</entry> <entry> PHP <= 4.2.0 requires <filename>libsasl.dll</filename> (bundled), PHP >= 4.3.0 requires <filename>libeay32.dll</filename>, <filename>ssleay32.dll</filename> (bundled) </entry> </row> <row> <entry>php_mbstring.dll</entry> <entry><link linkend="ref.mbstring">Multi-Byte String</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_mcrypt.dll</entry> <entry><link linkend="ref.mcrypt">Mcrypt Encryption</link> functions</entry> <entry>Requires: <filename>libmcrypt.dll</filename></entry> </row> <row> <entry>php_mhash.dll</entry> <entry><link linkend="ref.mhash">Mhash</link> functions</entry> <entry>PHP >= 4.3.0 requires: <filename>libmhash.dll</filename> (bundled)</entry> </row> <row> <entry>php_mime_magic.dll</entry> <entry><link linkend="ref.mime-magic">Mimetype</link> functions</entry> <entry>Requires: <filename>magic.mime</filename> (bundled)</entry> </row> <row> <entry>php_ming.dll</entry> <entry><link linkend="ref.ming">Ming</link> functions for Flash</entry> <entry>None</entry> </row> <row> <entry>php_msql.dll</entry> <entry><link linkend="ref.msql">mSQL</link> functions</entry> <entry>Requires: <filename>msql.dll</filename> (bundled)</entry> </row> <row> <entry>php3_msql1.dll</entry> <entry>mSQL 1 client</entry> <entry>unknown</entry> </row> <row> <entry>php3_msql2.dll</entry> <entry>mSQL 2 client</entry> <entry>unknown</entry> </row> <row> <entry>php_mssql.dll</entry> <entry><link linkend="ref.mssql">MSSQL</link> functions</entry> <entry>Requires: <filename>ntwdblib.dll</filename> (bundled)</entry> </row> <row> <entry>php3_mysql.dll</entry> <entry><link linkend="ref.mysql">MySQL</link> functions</entry> <entry>Built-in in PHP 4</entry> </row> <row> <entry>php3_nsmail.dll</entry> <entry>Netscape mail functions</entry> <entry>unknown</entry> </row> <row> <entry>php3_oci73.dll</entry> <entry>Oracle functions</entry> <entry>unknown</entry> </row> <row> <entry>php_oci8.dll</entry> <entry><link linkend="ref.oci8">Oracle 8</link> functions</entry> <entry>Requires: Oracle 8.1+ client libraries</entry> </row> <row> <entry>php_openssl.dll</entry> <entry><link linkend="ref.openssl">OpenSSL</link> functions</entry> <entry>Requires: <filename>libeay32.dll</filename> (bundled)</entry> </row> <row> <entry>php_oracle.dll</entry> <entry><link linkend="ref.oracle">Oracle</link> functions</entry> <entry>Requires: Oracle 7 client libraries</entry> </row> <row> <entry>php_overload.dll</entry> <entry><link linkend="ref.overload">Object overloading</link> functions</entry> <entry>Built in since PHP 4.3.0</entry> </row> <row> <entry>php_pdf.dll</entry> <entry><link linkend="ref.pdf">PDF</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_pgsql.dll</entry> <entry><link linkend="ref.pgsql">PostgreSQL</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_printer.dll</entry> <entry><link linkend="ref.printer">Printer</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_shmop.dll</entry> <entry><link linkend="ref.shmop">Shared Memory</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_snmp.dll</entry> <entry><link linkend="ref.snmp">SNMP</link> get and walk functions</entry> <entry>NT only!</entry> </row> <row> <entry>php_sockets.dll</entry> <entry><link linkend="ref.sockets">Socket</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_sybase_ct.dll</entry> <entry><link linkend="ref.sybase">Sybase</link> functions</entry> <entry>Requires: Sybase client libraries</entry> </row> <row> <entry>php_tokenizer.dll</entry> <entry><link linkend="ref.tokenizer">Tokenizer</link> functions</entry> <entry>Built in since PHP 4.3.0</entry> </row> <row> <entry>php_w32api.dll</entry> <entry><link linkend="ref.w32api">W32api</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_xmlrpc.dll</entry> <entry><link linkend="ref.xmlrpc">XML-RPC</link> functions</entry> <entry>PHP >= 4.2.1 requires: <filename>iconv.dll</filename> (bundled)</entry> </row> <row> <entry>php_xslt.dll</entry> <entry><link linkend="ref.xslt">XSLT</link> functions</entry> <entry> PHP <= 4.2.0 requires <filename>sablot.dll</filename>, <filename>expat.dll</filename> (bundled). PHP >= 4.2.1 requires <filename>sablot.dll</filename>, <filename>expat.dll</filename>, <filename>iconv.dll</filename> (bundled). </entry> </row> <row> <entry>php_yaz.dll</entry> <entry><link linkend="ref.yaz">YAZ</link> functions</entry> <entry>Requires: <filename>yaz.dll</filename> (bundled)</entry> </row> <row> <entry>php_zip.dll</entry> <entry><link linkend="ref.zip">Zip File</link> functions</entry> <entry>Read only access</entry> </row> <row> <entry>php_zlib.dll</entry> <entry><link linkend="ref.zlib">ZLib</link> compression functions</entry> <entry>Built in since PHP 4.3.0</entry> </row> </tbody> </tgroup> </table> </para> </sect2> </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
http://cvs.php.net/co.php/phpdoc-es/chapters/install.windows.xml?r=1.1&p=1 Index: phpdoc-es/chapters/install.windows.xml +++ phpdoc-es/chapters/install.windows.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <sect1 id="install.windows"> <title>Instalación en sistemas Windows</title> <para> Esta sección contiene informació para instalar en los sistemas operativos Windows 98/Me y Windows NT/2000/XP. PHP no trabajará en plataformas de 16 bit tales como Windows 3.1 y a veces nos referimos a plataformas Windows soportadas como Win32. Windows 95 is no longer supported as of PHP 4.3.0. </para> <para> There are two main ways to install PHP for Windows: either <link linkend="install.windows.manual">manually</link> or by using the <link linkend="install.windows.installer">InstallShield</link> installer. </para> <para> If you have Microsoft Visual Studio, you can also <link linkend="install.windows.build">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> <sect2 id="install.windows.installer"> <title>Windows InstallShield</title> <para> The Windows PHP installer is available from the downloads page at <ulink url="&url.php.downloads;">&url.php.downloads;</ulink>. This installs the <emphasis>CGI version</emphasis> of <literal>PHP</literal> and, for IIS, PWS, and Xitami, configures the web server as well. </para> <note> <para> While the InstallShield installer is an easy way to make <literal>PHP</literal> 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. </para> </note> <simpara> Install your selected <acronym>HTTP</acronym> server on your system and make sure that it works. </simpara> <simpara> 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. </simpara> <simpara> 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. </simpara> <simpara> 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. </simpara> <warning> <para> 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. </para> </warning> </sect2> <sect2 id="install.windows.manual"> <title>Manual Installation Steps</title> <simpara> 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 <ulink url="&url.win32install;">&url.win32install;</ulink>. You need to download the zip binary distribution from the downloads page at <ulink url="&url.php.downloads;">&url.php.downloads;</ulink>. </simpara> <para> PHP 4 for Windows comes in three flavours - a CGI executable (php.exe), a CLI executable (sapi/php.exe) and some other SAPI modules: <simplelist> <member> <filename>php4apache.dll</filename> - Apache 1.3.x module </member> <member> <filename>php4apache2.dll</filename> - Apache 2.0.x module </member> <member> <filename>php4isapi.dll</filename> - ISAPI Module for ISAPI compliant webservers like IIS 4.0/PWS 4.0 or newer. </member> <member> <filename>php4nsapi.dll</filename> - Netscape/iPlanet module </member> </simplelist> 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 <link linkend="features.commandline">using PHP from the command line</link> </para> <warning> <simpara> The SAPI modules have been significantly improved in the 4.1 release, however, you may find that you encounter possible server errors or other server modules such as ASP failing, in older systems. </simpara> </warning> <note> <title>DCOM and MDAC requirements</title> <para> If you choose one of the SAPI modules and use <emphasis>Windows 95</emphasis>, be sure to download and install the DCOM update from the <ulink url="&url.dcom.update;">Microsoft DCOM pages</ulink>. If you use Microsoft <emphasis>Windows 9x/NT4</emphasis> download the latest version of the Microsoft Data Access Components (MDAC) for your platform. MDAC is available at <ulink url="&url.mdac;">&url.mdac;</ulink>. </para> </note> <para> The following steps should be performed on all installations before any server specific instructions. <itemizedlist> <listitem> <simpara> Extract the distribution file to a directory of your choice, <filename class="directory">c:\</filename> is a good start. The zip package expands to a foldername like <filename>php-4.3.1-Win32</filename> which is assumed to be renamed to <filename>php</filename>. For the sake of convenience and to be version independent the following steps assume your extracted version of PHP lives in <filename class="directory">c:\php</filename>. You might choose any other location but you probably do not want to use a path in which spaces are included (for example: <filename class="directory">C:\Program Files\PHP</filename> is not a good idea). Some web servers will crash if you do. The structure of your directory you extracted the zip file will look like: </simpara> </listitem> </itemizedlist> <informalexample> <programlisting> <![CDATA[ c:\php | +--cli | | | |-php.exe -- CLI executable - ONLY for commandline scripting | | +--dlls -- support dlls for extensions --> 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 | |-... ]]> </programlisting> </informalexample> </para> <para> The CGI binary - <filename>c:\php\php.exe</filename> -, the CLI binary - <filename>c:\php\cli\php.exe</filename> -, and the SAPI modules - <filename>c:\php\sapi\*.dll</filename> - rely on the main dll <filename>c:\php\php4ts.dll</filename>. You have to make sure, that this dll can be found by your PHP installation. The search order for this dll is as follows: <simplelist> <member> The same directory from where <filename>php.exe</filename> is called. In case you use a SAPI module the same directory from where your webserver loads the dll (e.g. <filename>php4apache.dll</filename>). </member> <member> Any directory in your Windows PATH environment variable. </member> </simplelist> <itemizedlist> <listitem> <para> The best bet is to make <filename>php4ts.dll</filename> 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: <simplelist> <member> <filename class="directory">C:\Windows\System</filename> for Windows 9x/ME </member> <member> <filename class="directory">C:\WINNT\System32</filename> for Windows NT/2000 or <filename class="directory">C:\WINNT40\System32</filename> for NT/2000 server </member> <member> <filename class="directory">C:\Windows\System32</filename> for Windows XP </member> </simplelist> If you plan to use a SAPI module from <filename class="directory">c:\php\sapi</filename> and do not like to copy dlls to your Windows system directory, you have the alternative choice to simply copy <filename>php4ts.dll</filename> to the sapi folder of your extracted zip package, <filename class="directory">c:\php\sapi</filename>. </para> </listitem> <listitem> <para> 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, <filename>php.ini-dist</filename> and <filename>php.ini-recommended</filename>. We advise you to use <filename>php.ini-recommended</filename>, because we optimized the default settings in this file for performance, and security. Read this well documented file carefully and in addition study the <link linkend="configuration.file">ini settings</link> 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 chosen ini-file to a directory where PHP is able to find and rename it to &php.ini;. By default PHP searches &php.ini; in your Windows directory: <simplelist> <member> On Windows 9x/ME/XP copy your chosen ini file to your <filename> %WINDIR%</filename>, which is typically <filename class="directory">C:\Windows</filename>. </member> <member> On Windows NT/2000 copy your chosen ini file to your <filename>%WINDIR%</filename> or <filename>%SYSTEMROOT%</filename>, which is typically <filename class="directory">C:\WINNT</filename> or <filename class="directory">C:\WINNT40</filename> for NT/2000 servers. </member> </simplelist> </para> </listitem> <listitem> <simpara> 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). </simpara> </listitem> </itemizedlist> </para> <para> The following steps are optional. <itemizedlist> <listitem> <para> Edit your new &php.ini; file. If you plan to use <link linkend="install.omnihttpd">OmniHTTPd</link>, do not follow the next step. Set the <link linkend="ini.doc-root">doc_root</link> to point to your webservers document_root. For example: <informalexample> <programlisting role="ini"> <![CDATA[ doc_root = c:\inetpub // for IIS/PWS doc_root = c:\apache\htdocs // for Apache ]]> </programlisting> </informalexample> </para> </listitem> <listitem> <simpara> Choose which extensions you would like to load when PHP starts. See the section about <link linkend="install.windows.extensions">Windows extensions</link>, 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;. </simpara> </listitem> <listitem> <simpara> On PWS and IIS, you can set the <link linkend="ini.browscap">browscap</link> configuration setting to point to: <filename>c:\windows\system\inetsrv\browscap.ini</filename> on Windows 9x/Me, <filename>c:\winnt\system32\inetsrv\browscap.ini</filename> on NT/2000, and <filename>c:\windows\system32\inetsrv\browscap.ini</filename> on XP. </simpara> </listitem> </itemizedlist> </para> <para> 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: <itemizedlist> <listitem> <simpara> .. the <link linkend="install.iis">Windows server family</link>, Personal Web server (PWS) 3 and 4 or newer; Internet Information Server (IIS) 3 and 4 or newer. </simpara> </listitem> <listitem> <simpara> .. the Apache servers <link linkend="install.apache.windows">Apache 1.3.x</link>, and <link linkend="install.apache2.windows">Apache 2.x</link>. </simpara> </listitem> <listitem> <simpara> .. the <link linkend="install.netscape.windows">Netscape/iPlanet</link> servers. </simpara> </listitem> <listitem> <simpara> .. the <link linkend="install.omnihttpd">OmniHTTPd</link> server. </simpara> </listitem> <listitem> <simpara> .. the <link linkend="install.oreilly">Oreilly Website Pro</link> server. </simpara> </listitem> <listitem> <simpara> .. the <link linkend="install.sambar">Sambar</link> server. </simpara> </listitem> <listitem> <simpara> .. the <link linkend="install.xitami">Xitami</link> server. </simpara> </listitem> </itemizedlist> </para> </sect2> <sect2 id="install.windows.build"> <title>Building from source</title> <para> Before getting started, it is worthwhile answering the question: "Why is building on Windows so hard?" Two reasons come to mind: </para> <orderedlist> <listitem> <simpara> Windows does not (yet) enjoy a large community of developers who are willing to freely share their source. As a direct result, the necessary investment in infrastructure required to support such development hasn't been made. By and large, what is available has been made possible by the porting of necessary utilities from Unix. Don't be surprised if some of this heritage shows through from time to time. </simpara> </listitem> <listitem> <simpara> Pretty much all of the instructions that follow are of the "set and forget" variety. So sit back and try follow the instructions below as faithfully as you can. </simpara> </listitem> </orderedlist> <sect3 id="install.windows.build.requirement"> &reftitle.required; <para> To compile and build <literal>PHP</literal> you need a Microsoft Development Environment. Microsoft Visual C++ 6.0 is recommended. To extract the downloaded files you need a extraction utility (e.g.: Winzip). If you don't already have an unzip utility, you can get a free version from <ulink url="&url.infozip;">InfoZip</ulink>. </para> <para> Before you get started, you have to download... </para> <itemizedlist> <listitem> <simpara> ..the win32 buildtools from the <literal>PHP</literal> site at <ulink url="&url.win32.buildtools;">&url.win32.buildtools;</ulink>. </simpara> </listitem> <listitem> <simpara> ..the source code for the DNS name resolver used by <literal>PHP </literal> from <ulink url="&url.win32.dnsresolver;"> &url.win32.dnsresolver;</ulink>. This is a replacement for the <filename>resolv.lib</filename> library included in <filename> win32build.zip</filename>. </simpara> </listitem> <listitem> <simpara> If you plan to compile <literal>PHP</literal> as a Apache module you will also need the <ulink url="&url.apache.source;">Apache sources</ulink>. </simpara> </listitem> </itemizedlist> <simpara> Finally, you are going to need the source to PHP 4 itself. You can get the latest development version using <ulink url="&url.php.anoncvs;"> anonymous CVS</ulink>, a <ulink url="&url.php.snapshots;"> snapshot</ulink> or the most recent released <ulink url="&url.php.downloads;"> source</ulink> tarball. </simpara> </sect3> <sect3 id="install.windows.build.install"> <title>Putting it all together</title> <para> After downloading the required packages you have to extract them in a proper place. <itemizedlist> <listitem> <simpara> Create a working directory where all files end up after extracting, e.g: <filename class="directory">C:\work</filename>. </simpara> </listitem> <listitem> <simpara> Create the directory <filename>win32build</filename> under your working directory (<filename class="directory">C:\work</filename>) and unzip <filename> win32build.zip</filename> into it. </simpara> </listitem> <listitem> <simpara> Create the directory <filename>bindlib_w32</filename> under your working directory (<filename class="directory">C:\work</filename>) and unzip <filename> bindlib_w32.zip</filename> into it. </simpara> </listitem> <listitem> <simpara> Extract the downloaded PHP source code into your working directory (<filename class="directory">C:\work</filename>). </simpara> </listitem> </itemizedlist> Following this steps your directory structure looks like this: <informalexample> <programlisting> <![CDATA[ +--c:\work | | | +--bindlib_w32 | | | | | +--arpa | | | | | +--conf | | | | | +--... | | | +--php-4.x.x | | | | | +--build | | | | | +--... | | | | | +--win32 | | | | | +--... | | | +--win32build | | | | | +--bin | | | | | +--include | | | | | +--lib ]]> </programlisting> </informalexample> Create the directories <filename class="directory">c:\usr\local\lib</filename>. Copy <filename>bison.simple</filename> from <filename class="directory">c:\work\win32build\bin </filename> to <filename class="directory">c:\usr\local\lib</filename>. </para> <note> <simpara> <ulink url="&url.cygwin;">Cygwin</ulink> users may omit the last step. A properly installed Cygwin environment provides the mandatory files <filename>bison.simple</filename> and <filename>bison.exe</filename>. </simpara> </note> </sect3> <sect3 id="install.windows.build.configure"> <title>Configure MVC ++</title> <para> The next step is to configure MVC ++ to prepare for compiling. Launch Microsoft Visual C++, and from the menu select Tools => Options. In the dialog, select the directories tab. Sequentially change the dropdown to Executables, Includes, and Library files. Your entries should look like this: <itemizedlist> <listitem> <simpara> Executable files: <filename class="directory">c:\work\win32build\bin</filename>, Cygwin users: <filename>cygwin\bin</filename> </simpara> </listitem> <listitem> <simpara> Include files: <filename class="directory">c:\work\win32build\include</filename> </simpara> </listitem> <listitem> <simpara> Library files: <filename class="directory">c:\work\win32build\lib</filename> </simpara> </listitem> </itemizedlist> </para> </sect3> <sect3 id="install.windows.build.resolvlib"> <title>Build resolv.lib</title> <para> You must build the <filename>resolv.lib</filename> library. Decide whether you want to have debug symbols available (bindlib - Win32 Debug) or not (bindlib - Win32 Release). Build the appropriate configuration: <itemizedlist> <listitem> <simpara> For GUI users, launch VC++, and then select File => Open Workspace, navigate to <filename class="directory">c:\work\bindlib_w32</filename> and select <filename>bindlib.dsw</filename>. Then select Build=>Set Active Configuration and select the desired configuration. Finally select Build=>Rebuild All. </simpara> </listitem> <listitem> <simpara> For command line users, make sure that you either have the C++ environment variables registered, or have run <command>vcvars.bat</command>, and then execute one of the following commands: </simpara> <itemizedlist> <listitem> <simpara> <userinput>msdev bindlib.dsp /MAKE "bindlib - Win32 Debug"</userinput> </simpara> </listitem> <listitem> <simpara> <userinput>msdev bindlib.dsp /MAKE "bindlib - Win32 Release"</userinput> </simpara> </listitem> </itemizedlist> </listitem> </itemizedlist> At this point, you should have a usable <filename>resolv.lib</filename> in either your <filename class="directory">c:\work\bindlib_w32\Debug</filename> or <filename>Release</filename> subdirectories. Copy this file into your <filename class="directory">c:\work\win32build\lib</filename> directory over the file by the same name found in there. </para> </sect3> <sect3 id="install.windows.build.compile"> <title>Compiling</title> <simpara> The best way to get started is to build the CGI version. </simpara> <itemizedlist> <listitem> <simpara> For GUI users, launch VC++, and then select File => Open Workspace and select <filename>c:\work\php-4.x.x\win32\php4ts.dsw </filename>. Then select Build=>Set Active Configuration and select the desired configuration, either <literal>php4ts - Win32 Debug_TS</literal> or <literal>php4ts - Win32 Release_TS</literal>. Finally select Build=>Rebuild All. </simpara> </listitem> <listitem> <simpara> For command line users, make sure that you either have the C++ environment variables registered, or have run <command>vcvars.bat</command>, and then execute one of the following commands from the <filename class="directory">c:\work\php-4.x.x\win32 </filename> directory: </simpara> <itemizedlist> <listitem> <simpara> <userinput>msdev php4ts.dsp /MAKE "php4ts - Win32 Debug_TS"</userinput> </simpara> </listitem> <listitem> <simpara> <userinput>msdev php4ts.dsp /MAKE "php4ts - Win32 Release_TS"</userinput> </simpara> </listitem> <listitem> <simpara> At this point, you should have a usable <filename>php.exe</filename> in either your <filename class="directory">c:\work\php-4.x.x.\Debug_TS</filename> or <filename>Release_TS</filename> subdirectories. </simpara> </listitem> </itemizedlist> </listitem> </itemizedlist> <simpara> It is possible to do minor customization to the build process by editing the <filename>main/config.win32.h</filename> file. For example you can change the default location of &php.ini;, the built-in extensions, and the default location for your extensions. </simpara> <simpara> Next you may want to build the CLI version which is designed to use <link linkend="features.commandline">PHP from the command line</link>. The steps are the same as for building the CGI version, except you have to select the <literal>php4ts_cli - Win32 Debug_TS</literal> or <literal>php4ts_cli - Win32 Release_TS</literal> project file. After a successful compiling run you will find the <filename>php.exe</filename> in either the directory <filename>Release_TS\cli\</filename> or <filename>Debug_TS\cli\</filename>. </simpara> <note> <simpara> If you want to use PEAR and the comfortable command line installer, the CLI-SAPI is mandatory. For more information about PEAR and the installer read the documentation at the <ulink url="&url.php.pear;manual/"> PEAR</ulink> website. </simpara> </note> <simpara> In order to build the SAPI module (<filename>php4isapi.dll</filename>) for integrating PHP with Microsoft IIS, set your active configuration to <filename>php4isapi-whatever-config</filename> and build the desired dll. </simpara> </sect3> </sect2> <sect2 id="install.windows.extensions"> <title>Installation of Windows extensions</title> <para> 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 <function>dl</function>. </para> <para> The DLLs for PHP extensions are prefixed with 'php_' in PHP 4 (and 'php3_' in PHP 3). This prevents confusion between PHP extensions and their supporting libraries. </para> <note> <para> In PHP 4.3.1 BCMath, Calendar, COM, Ctype, FTP, MySQL, ODBC, Overload, PCRE, Session, Tokenizer, WDDX, XML and Zlib support is <emphasis>built in</emphasis>. You don't need to load any additional extensions in order to use these functions. See your distributions <filename>README.txt</filename> or <filename>install.txt</filename> or <link linkend ="install.extensions.overview">this table</link> for a list of built in modules. </para> </note> <para> The default location <literal>PHP</literal> searches for extensions is <filename class="directory">c:\php4\extensions</filename>. To change this setting to reflect your setup of <literal>PHP</literal> edit your &php.ini; file: <itemizedlist> <listitem> <para> You will need to change the <link linkend ="ini.extension-dir">extension_dir</link> setting to point to the directory where your extensions lives, or where you have placed your <filename>php_*.dll</filename> files. Please do not forget the last backslash. For example: <informalexample> <programlisting role="ini"> <![CDATA[ extension_dir = c:/php/extensions/ ]]> </programlisting> </informalexample> </para> </listitem> <listitem> <para> Enable the extension(s) in &php.ini; you want to use by uncommenting the <literal>extension=php_*.dll</literal> lines in &php.ini;. This is done by deleting the leading ; form the extension you want to load. <example> <title>Enable <link linkend="ref.bzip2">Bzip2</link> extension for PHP-Windows</title> <programlisting role="ini"> <![CDATA[ // change the following line from ... ;extension=php_bz2.dll // ... to extension=php_bz2.dll ]]> </programlisting> </example> </para> </listitem> <listitem> <para> Some of the extensions need extra DLLs to work. Couple of them can be found in the distribution package, in the <filename class="directory">c:\php\dlls\</filename> folder but some, for example Oracle (<filename>php_oci8.dll</filename>) require DLLs which are not bundled with the distribution package. Copy the bundled DLLs from <filename class="directory">c:\php\dlls</filename> folder to your Windows PATH, safe places are: <simplelist> <member>c:\windows\system for Windows 9x/Me</member> <member>c:\winnt\system32 for Windows NT/2000</member> <member>c:\windows\system32 for Windows XP</member> </simplelist> 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). </para> </listitem> </itemizedlist> <note> <simpara> If you are running a server module version of <literal>PHP</literal> remember to restart your webserver to reflect your changes to &php.ini;. </simpara> </note> </para> <para> The following table describes some of the extensions available and required additional dlls. <table id="install.extensions.overview"> <title>PHP Extensions</title> <tgroup cols="3"> <thead> <row> <entry>Extension</entry> <entry>Description</entry> <entry>Notes</entry> </row> </thead> <tbody> <row> <entry>php_bz2.dll</entry> <entry><link linkend="ref.bzip2">bzip2</link> compression functions</entry> <entry>None</entry> </row> <row> <entry>php_calendar.dll</entry> <entry><link linkend="ref.calendar">Calendar</link> conversion functions</entry> <entry>Built in since PHP 4.0.3</entry> </row> <row> <entry>php_cpdf.dll</entry> <entry><link linkend="ref.cpdf">ClibPDF</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_crack.dll</entry> <entry><link linkend="ref.crack">Crack</link> functions</entry> <entry>None</entry> </row> <row> <entry>php3_crypt.dll</entry> <entry>Crypt functions</entry> <entry>unknown</entry> </row> <row> <entry>php_ctype.dll</entry> <entry><link linkend="ref.ctype">ctype</link> family functions</entry> <entry>Built in since PHP 4.3.0</entry> </row> <row> <entry>php_curl.dll</entry> <entry><link linkend="ref.curl">CURL</link>, Client URL library functions</entry> <entry>Requires: <filename>libeay32.dll</filename>, <filename>ssleay32.dll</filename> (bundled)</entry> </row> <row> <entry>php_cybercash.dll</entry> <entry><link linkend="ref.cybercash">Cybercash</link> payment functions</entry> <entry>PHP <= 4.2.0</entry> </row> <row> <entry>php_db.dll</entry> <entry><link linkend="ref.dbm">DBM</link> functions</entry> <entry>Deprecated. Use DBA instead (<filename>php_dba.dll</filename>)</entry> </row> <row> <entry>php_dba.dll</entry> <entry><link linkend="ref.dba">DBA</link>: DataBase (dbm-style) Abstraction layer functions</entry> <entry>None</entry> </row> <row> <entry>php_dbase.dll</entry> <entry><link linkend="ref.dbase">dBase</link> functions</entry> <entry>None</entry> </row> <row> <entry>php3_dbm.dll</entry> <entry>Berkeley DB2 library</entry> <entry>unknown</entry> </row> <row> <entry>php_dbx.dll</entry> <entry><link linkend="ref.dbx">dbx</link> functions</entry> <entry></entry> </row> <row> <entry>php_domxml.dll</entry> <entry><link linkend="ref.domxml">DOM XML</link> functions</entry> <entry> PHP <= 4.2.0 requires: <filename>libxml2.dll</filename> (bundled) PHP >= 4.3.0 requires: <filename>iconv.dll</filename> (bundled) </entry> </row> <row> <entry>php_dotnet.dll</entry> <entry><link linkend="ref.dotnet">.NET</link> functions</entry> <entry>PHP <= 4.1.1</entry> </row> <row> <entry>php_exif.dll</entry> <entry><link linkend="function.read-exif-data">Read EXIF</link> headers from JPEG</entry> <entry>None</entry> </row> <row> <entry>php_fbsql.dll</entry> <entry><link linkend="ref.fbsql">FrontBase</link> functions</entry> <entry>PHP <= 4.2.0</entry> </row> <row> <entry>php_fdf.dll</entry> <entry><link linkend="ref.fdf">FDF</link>: Forms Data Format functions.</entry> <entry>Requires: <filename>fdftk.dll</filename> (bundled)</entry> </row> <row> <entry>php_filepro.dll</entry> <entry><link linkend="ref.filepro">filePro</link> functions</entry> <entry>Read-only access</entry> </row> <row> <entry>php_ftp.dll</entry> <entry><link linkend="ref.ftp">FTP</link> functions</entry> <entry>Built-in since PHP 4.0.3</entry> </row> <row> <entry>php_gd.dll</entry> <entry><link linkend="ref.image">GD</link> library image functions</entry> <entry> Removed in PHP 4.3.2. Also note that truecolor functions are not available in GD1, instead, use <filename>php_gd2.dll</filename>. </entry> </row> <row> <entry>php_gd2.dll</entry> <entry><link linkend="ref.image">GD</link> library image functions</entry> <entry>GD2</entry> </row> <row> <entry>php_gettext.dll</entry> <entry><link linkend="ref.gettext">Gettext</link> functions</entry> <entry> PHP <= 4.2.0 requires <filename>gnu_gettext.dll</filename> (bundled), PHP >= 4.2.3 requires <filename>libintl-1.dll</filename>, <filename>iconv.dll</filename> (bundled). </entry> </row> <row> <entry>php_hyperwave.dll</entry> <entry><link linkend="ref.hw">HyperWave</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_iconv.dll</entry> <entry><link linkend="ref.iconv">ICONV</link> characterset conversion</entry> <entry>Requires: <filename>iconv-1.3.dll</filename> (bundled), PHP >=4.2.1 <filename>iconv.dll</filename></entry> </row> <row> <entry>php_ifx.dll</entry> <entry><link linkend="ref.ifx">Informix</link> functions</entry> <entry>Requires: Informix libraries</entry> </row> <row> <entry>php_iisfunc.dll</entry> <entry>IIS management functions</entry> <entry>None</entry> </row> <row> <entry>php_imap.dll</entry> <entry><link linkend="ref.imap">IMAP</link> POP3 and NNTP functions</entry> <entry>PHP 3: <filename>php3_imap4r1.dll</filename></entry> </row> <row> <entry>php_ingres.dll</entry> <entry><link linkend="ref.ingres">Ingres II</link> functions</entry> <entry>Requires: Ingres II libraries</entry> </row> <row> <entry>php_interbase.dll</entry> <entry><link linkend="ref.ibase">InterBase</link> functions</entry> <entry>Requires: <filename>gds32.dll</filename> (bundled)</entry> </row> <row> <entry>php_java.dll</entry> <entry><link linkend="ref.java">Java</link> functions</entry> <entry>PHP <= 4.0.6 requires: <filename>jvm.dll</filename> (bundled)</entry> </row> <row> <entry>php_ldap.dll</entry> <entry><link linkend="ref.ldap">LDAP</link> functions</entry> <entry> PHP <= 4.2.0 requires <filename>libsasl.dll</filename> (bundled), PHP >= 4.3.0 requires <filename>libeay32.dll</filename>, <filename>ssleay32.dll</filename> (bundled) </entry> </row> <row> <entry>php_mbstring.dll</entry> <entry><link linkend="ref.mbstring">Multi-Byte String</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_mcrypt.dll</entry> <entry><link linkend="ref.mcrypt">Mcrypt Encryption</link> functions</entry> <entry>Requires: <filename>libmcrypt.dll</filename></entry> </row> <row> <entry>php_mhash.dll</entry> <entry><link linkend="ref.mhash">Mhash</link> functions</entry> <entry>PHP >= 4.3.0 requires: <filename>libmhash.dll</filename> (bundled)</entry> </row> <row> <entry>php_mime_magic.dll</entry> <entry><link linkend="ref.mime-magic">Mimetype</link> functions</entry> <entry>Requires: <filename>magic.mime</filename> (bundled)</entry> </row> <row> <entry>php_ming.dll</entry> <entry><link linkend="ref.ming">Ming</link> functions for Flash</entry> <entry>None</entry> </row> <row> <entry>php_msql.dll</entry> <entry><link linkend="ref.msql">mSQL</link> functions</entry> <entry>Requires: <filename>msql.dll</filename> (bundled)</entry> </row> <row> <entry>php3_msql1.dll</entry> <entry>mSQL 1 client</entry> <entry>unknown</entry> </row> <row> <entry>php3_msql2.dll</entry> <entry>mSQL 2 client</entry> <entry>unknown</entry> </row> <row> <entry>php_mssql.dll</entry> <entry><link linkend="ref.mssql">MSSQL</link> functions</entry> <entry>Requires: <filename>ntwdblib.dll</filename> (bundled)</entry> </row> <row> <entry>php3_mysql.dll</entry> <entry><link linkend="ref.mysql">MySQL</link> functions</entry> <entry>Built-in in PHP 4</entry> </row> <row> <entry>php3_nsmail.dll</entry> <entry>Netscape mail functions</entry> <entry>unknown</entry> </row> <row> <entry>php3_oci73.dll</entry> <entry>Oracle functions</entry> <entry>unknown</entry> </row> <row> <entry>php_oci8.dll</entry> <entry><link linkend="ref.oci8">Oracle 8</link> functions</entry> <entry>Requires: Oracle 8.1+ client libraries</entry> </row> <row> <entry>php_openssl.dll</entry> <entry><link linkend="ref.openssl">OpenSSL</link> functions</entry> <entry>Requires: <filename>libeay32.dll</filename> (bundled)</entry> </row> <row> <entry>php_oracle.dll</entry> <entry><link linkend="ref.oracle">Oracle</link> functions</entry> <entry>Requires: Oracle 7 client libraries</entry> </row> <row> <entry>php_overload.dll</entry> <entry><link linkend="ref.overload">Object overloading</link> functions</entry> <entry>Built in since PHP 4.3.0</entry> </row> <row> <entry>php_pdf.dll</entry> <entry><link linkend="ref.pdf">PDF</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_pgsql.dll</entry> <entry><link linkend="ref.pgsql">PostgreSQL</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_printer.dll</entry> <entry><link linkend="ref.printer">Printer</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_shmop.dll</entry> <entry><link linkend="ref.shmop">Shared Memory</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_snmp.dll</entry> <entry><link linkend="ref.snmp">SNMP</link> get and walk functions</entry> <entry>NT only!</entry> </row> <row> <entry>php_sockets.dll</entry> <entry><link linkend="ref.sockets">Socket</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_sybase_ct.dll</entry> <entry><link linkend="ref.sybase">Sybase</link> functions</entry> <entry>Requires: Sybase client libraries</entry> </row> <row> <entry>php_tokenizer.dll</entry> <entry><link linkend="ref.tokenizer">Tokenizer</link> functions</entry> <entry>Built in since PHP 4.3.0</entry> </row> <row> <entry>php_w32api.dll</entry> <entry><link linkend="ref.w32api">W32api</link> functions</entry> <entry>None</entry> </row> <row> <entry>php_xmlrpc.dll</entry> <entry><link linkend="ref.xmlrpc">XML-RPC</link> functions</entry> <entry>PHP >= 4.2.1 requires: <filename>iconv.dll</filename> (bundled)</entry> </row> <row> <entry>php_xslt.dll</entry> <entry><link linkend="ref.xslt">XSLT</link> functions</entry> <entry> PHP <= 4.2.0 requires <filename>sablot.dll</filename>, <filename>expat.dll</filename> (bundled). PHP >= 4.2.1 requires <filename>sablot.dll</filename>, <filename>expat.dll</filename>, <filename>iconv.dll</filename> (bundled). </entry> </row> <row> <entry>php_yaz.dll</entry> <entry><link linkend="ref.yaz">YAZ</link> functions</entry> <entry>Requires: <filename>yaz.dll</filename> (bundled)</entry> </row> <row> <entry>php_zip.dll</entry> <entry><link linkend="ref.zip">Zip File</link> functions</entry> <entry>Read only access</entry> </row> <row> <entry>php_zlib.dll</entry> <entry><link linkend="ref.zlib">ZLib</link> compression functions</entry> <entry>Built in since PHP 4.3.0</entry> </row> </tbody> </tgroup> </table> </para> </sect2> </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->