From cd3c40f0745da0d27959996bc688845ec646a874 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Fri, 26 Jan 2001 14:43:17 +0000 Subject: [PATCH] Inserting many-many new sections to the Windows install part. - Separate CGI and xSAPI installs - Added SAPI notes (from Windows dist. README.txt) - Added the following server installs (from install.txt): PWS 4 and up Xitami Oreilly - Added some text to Omni install about the built in PHP - Added ISAPI to Apache, IIS, PWS sections - Added Windows 2000 and Me to the lists of Windows systems - Now it is time for someone to review my bad english grammar :) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@40197 c90b9560-bf6c-de11-be94-00142212c4b1 --- chapters/install.xml | 594 +++++++++++++++++++++++++++++++------------ 1 file changed, 437 insertions(+), 157 deletions(-) diff --git a/chapters/install.xml b/chapters/install.xml index 7e6b6a406d..ca34fc642d 100644 --- a/chapters/install.xml +++ b/chapters/install.xml @@ -6,7 +6,9 @@ The source code, and binary distributions for some platforms (including Windows), can be found at &url.php;. + url="&url.php;">&url.php;. We recommend + you to choose a near mirror site of php.net for downloading. + You can find one with the dropdown menu on every page. @@ -294,27 +296,27 @@ Paul Mckay. autoconf - - - automake - - - - - perl - - - - - gzip - - - - - tar - - - + + + automake + + + + + perl + + + + + gzip + + + + + tar + + + In addition, you will need to install (and possibly compile) any additional software specific to your configuration (such as Oracle or MySQL. @@ -395,7 +397,7 @@ Paul Mckay. This will add a directory to your Apache source directory under src/modules/php4. -8. Now, reconfigure Apache to build in PHP4. +8. Now, reconfigure Apache to build in PHP 4. ./configure --exec-prefix=/usr \ --localstatedir=/var \ --mandir=/usr/share/man \ @@ -430,7 +432,7 @@ Paul Mckay. - + Other examples for Mac OS X client and @@ -1123,7 +1125,7 @@ Paul Mckay. PHP 3: Option not available in PHP 3 - PHP 4: Compile CCVS support into PHP4. Please specify your CCVS base + PHP 4: Compile CCVS support into PHP 4. Please specify your CCVS base install directory as DIR. @@ -2779,7 +2781,7 @@ Paul Mckay. - Installation on Windows 9x/NT/2000 systems + Installation on Windows 9x/Me/NT/2000 systems There are two main ways to install PHP for Windows: either manually @@ -2840,21 +2842,21 @@ Paul Mckay. General Installation Steps This install guide will help you manually install and configure - PHP on your Windows 9x/NT/2000 webservers. This guide was compiled by - &link.bob;. The original version can be found at &url.win32install;. + PHP on your Windows 9x/Me/NT/2000 webservers. This guide was compiled by + &link.bob;. The original version can be found at &url.win32install;. This guide provides manual installation support for: - Personal Web Server (Newest version recommended) + Personal Web Server 3 and 4 or newer - Internet Information Server 3 or 4 + Internet Information Server 3 and 4 or newer @@ -2867,7 +2869,43 @@ Paul Mckay. OmniHTTPd 2.0b1 and up + + + Oreilly Website Pro + + + + + Xitami + + + + + PHP 4 for Windows comes in two flavours - a CGI executable (php.exe), + and several SAPI modules (for exapmle php4isapi.dll). The latter form + is new to PHP 4, and provides significantly improved performance and + some new functionality. However, please note that the SAPI modules + are NOT yet considered to be production quality. + The reason for this is that the PHP SAPI modules are using the + thread-safe version of the PHP code, which is new to PHP 4, and has + not yet been tested and pounded enough to be considered completely + stable, and there are actually a few known bugs. On the other hand, + some people have reported very good results with the SAPI modules, + even though we're not aware of anyone actually running it on a + production site. In short - your mileage may vary; If you need + absolute stability, trade the performance of the SAPI modules + with the stability of the CGI executable. + + + If you choose one of the SAPI modules and use Windows 95, be sure + to download the DCOM update from the Microsoft + DCOM pages. For the ISAPI module, an ISAPI 4.0 compliant Web server + is required (tested on IIS 4.0, PWS 4.0 and IIS 5.0). IIS 3.0 is + NOT supported; You should download and + install the Windows NT 4.0 Option Pack with IIS 4.0 if you + want native PHP support. The following steps should be performed on all installations @@ -2916,22 +2954,25 @@ Paul Mckay. Choose which extensions you would like to load when PHP starts. You can uncomment the: 'extension=php_*.dll' lines - to load these extensions. Some extensions require you to have - additional libraries installed on your system for the - module to work correctly. The PHP FAQ has more information on - where to get supporting libraries. You can also load a - module dynamically in your script using dl. + in php.ini to load these extensions. + Some extensions require you to have additional libraries + installed on your system for the module to work correctly. + The PHP FAQ has more + information on where to get supporting libraries. You + can also load a module dynamically in your script + using dl. See the section about + Windows + extensions. - On PWS and IIS, you can set the browscap.ini to point to: - 'c:\windows\system\inetsrv\browscap.ini' on Windows 95/98 - and 'c:\winnt\system32\inetsrv\browscap.ini' on NT/2000 - Server. Additional information on using the browscap - functionality in PHP can be found at this mirror, select the "source" + On PWS and IIS, you can set the browscap.ini + to point to: 'c:\windows\system\inetsrv\browscap.ini' on + Windows 9x/Me and 'c:\winnt\system32\inetsrv\browscap.ini' + on NT/2000 Server. Additional information on using the + browscap functionality in PHP can be found at this mirror, select the "source" button to see it in action. @@ -2940,12 +2981,6 @@ Paul Mckay. - - The DLLs for PHP extensions are prefixed with 'php_'. This - prevents confusion between PHP extensions and their supporting - libraries. - - @@ -3031,13 +3066,13 @@ Paul Mckay. - Execute cygwin.exe and follow the installation - instructions. If you choose to install to a path other than - c:\cygnus, let the build process know by setting - the Cygwin environment variable. On Windows 95/98 setting - an environment variable can be done by placing a line in - your autoexec.bat. On Windows NT, go to My Computer => - Control Panel => System and select the environment tab. + Execute cygwin.exe and follow the installation + instructions. If you choose to install to a path other than + c:\cygnus, let the build process know by setting + the Cygwin environment variable. On Windows 95/98 setting + an environment variable can be done by placing a line in + your autoexec.bat. On Windows NT, go to My Computer => + Control Panel => System and select the environment tab. @@ -3053,16 +3088,16 @@ Paul Mckay. - 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, - and ensure that cygwin\bin, - win32build\include, and - win32build\lib are in each list, - respectively. (To add an entry, select a blank line - at the end of the list and begin typing). Typical entries - will look like this: + 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, + and ensure that cygwin\bin, + win32build\include, and + win32build\lib are in each list, + respectively. (To add an entry, select a blank line + at the end of the list and begin typing). Typical entries + will look like this: @@ -3095,18 +3130,22 @@ Paul Mckay. - For command line users, make sure that you either have - the C++ environment variables registered, or have run - vcvars.bat, and then execute one of the - following: + For command line users, make sure that you either have + the C++ environment variables registered, or have run + vcvars.bat, and then execute one of the + following: - - - msdev bindlib.dsp /MAKE "bindlib - Win32 Debug" - - - msdev bindlib.dsp /MAKE "bindlib - Win32 Release" - + + + + msdev bindlib.dsp /MAKE "bindlib - Win32 Debug" + + + + + msdev bindlib.dsp /MAKE "bindlib - Win32 Release" + + @@ -3174,12 +3213,29 @@ Paul Mckay. The following table describes some of the extensions available. As described in the manual installation steps, you can choose which extensions you would like to load when PHP starts by uncommenting the: - 'extension=php_*.dll' lines in php.ini. Some extensions require you - to have additional libraries installed on your system for the module to - work correctly. The PHP FAQ - has more information on where to get supporting libraries. You - can also load a module dynamically in your script using dl. - + 'extension=php_*.dll' lines in php.ini. Some + extensions require you to have additional libraries installed on + your system for the module to work correctly. The PHP + FAQ has more information on + where to get supporting libraries. You can also load a module + dynamically in your script using dl. + + + The DLLs for PHP extensions are prefixed with 'php_'. This + prevents confusion between PHP extensions and their supporting + libraries. + + + + In PHP 4.0.4pl1 MySQL, ODBC, FTP, Calendar, BCMath, COM, PCRE, + Session, WDDX and XML support is built-in. + You don't need to load any additional extensions in order to + use these functions. See your distributions + README.txt or install.txt + for a list of built in modules. + + + PHP Extensions @@ -3268,7 +3324,7 @@ Paul Mckay. Windows versions. - Details of installing PHP with apache on Unix. + Details of installing PHP with Apache on Unix. You can select arguments to add to the configure on line 8 below from the - Details of installing PHP on Windows 9x/NT/2000 with Apache 1.3.x + Details of installing PHP on Windows with Apache 1.3.x - You must edit your srm.conf or - httpd.conf to configure Apache to work with - the PHP CGI binary. + There are two ways to set up PHP to work with Apache 1.3.x + on Windows. One is to use the CGI binary (php.exe), + the other is to use the Apache module dll. In either case + you need to stop the Apache server, and edit your + srm.conf or httpd.conf + to configure Apache to work with PHP. - Although there can be a few variations of configuring PHP under - Apache, this one is simple enough to be used by the + Although there can be a few variations of configuring PHP + under Apache, these are simple enough to be used by the newcomer. Please consult the Apache Docs for further configuration directives. - + + If you unziped the PHP package to C:\PHP\ as desribed + in the General + Installation Steps section, you need to insert + these lines to your Apache conf file to set up the + CGI binary: - ScriptAlias /php/ "c:/path-to-php-dir/" + ScriptAlias /php/ "c:/php/" - AddType application/x-httpd-php .php - - - - - - - AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php .phtml @@ -3447,16 +3504,46 @@ Paul Mckay. + + If you would like to use PHP as a module in Apache, + you should move php4ts.dll to + the windows/system (for Windows 9x/Me) or windows/system32 + (for Windows NT/2000) directory, overwriting any older file. + Then you should add the following two lines to you Apache + conf file: + + + + + LoadModule php4_module c:/php/sapi/php4apache.dll + + + + + + + AddType application/x-httpd-php .php .phtml + + + + + + To use the source code highlighting feature, simply create a PHP script file and stick this code in: <?php show_source - ("original_php_script.php"); ?>. Substitute + ("original_php_script.php"); ?>. Substitute original_php_script.php with the name of the - file you wish to show the source of. (this is only one way of - doing it). Note: On Win-Apache all back - slashes in a path statement such as: "c:\directory\file.ext", - must be converted to forward slashes. + file you wish to show the source of. (This is only one way of + doing it). + + + On Win-Apache all backslashes in a path statement such + as: "c:\directory\file.ext", must be converted to + forward slashes. + + @@ -3542,11 +3629,11 @@ Paul Mckay. 6. Restart Caudium if it's currently running. 7. Log into the graphical configuration interface and go to the virtual server where you want to add PHP 4 support. -8. Click Add Module and locate and add the PHP4 Script Support module. +8. Click Add Module and locate and add the PHP 4 Script Support module. 9. If the documentation says that the 'PHP 4 interpreter isn't available', make sure that you restarted the server. If you did check /opt/caudium/logs/debug/default.1 for any errors related to - PHP4.so. Also make sure that caudium/server/lib/[pike-version]/PHP4.so + PHP 4.so. Also make sure that caudium/server/lib/[pike-version]/PHP4.so is present. 10. Configure the PHP Script Support module if needed. @@ -3572,12 +3659,14 @@ Paul Mckay. IIS/PWS Server installs - This section contains notes and hints specific to IIS installs - of PHP, both for IIS3 and - IIS4 versions. + This section contains notes and hints specific to IIS (Microsoft + Internet Information Server) installs of PHP for + PWS/IIS 3, + PWS 4 or newer and + IIS 4 or newer versions. - Windows 9x/NT/2000 and PWS/IIS 3 + Windows and PWS/IIS 3 The recommended method for configuring these servers is to use @@ -3587,13 +3676,15 @@ Paul Mckay. configuration. Or you can follow the steps below to do it manually. - - WARNING: These steps involve working directly with the windows - registry. One error here can leave your system in an unstable - state. We highly recommend that you back up your registry - first. The PHP Development team will not be held responsible if - you damage your registry. - + + + These steps involve working directly with the Windows + registry. One error here can leave your system in an unstable + state. We highly recommend that you back up your registry + first. The PHP Development team will not be held responsible if + you damage your registry. + + @@ -3724,50 +3815,105 @@ Paul Mckay. - - Windows NT and IIS 4 + + Windows and PWS 4 or newer - To install PHP on an NT Server running IIS 4, follow these - instructions: + When installing PHP on Windows with PWS 4 or newer version, + you have to options. One to set up the PHP CGI binary, + the other is to use the ISAPI module dll. - + + If you choose the CGI binary, do the following: - In Internet Service Manager (MMC), select the Web site or the - starting point directory of an application. + Edit the enclosed pws-php4cgi.reg + file (look into the sapi dir) to reflect the location of + your php.exe. Forward slashes should be escaped, for example: + [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="C:\\PHP\\php.exe" - Open the directory's property sheets (by right clicking and - selecting properties), and then click the Home Directory, - Virtual Directory, or Directory tab. + In the PWS Manager, right click on a given directory you want + to add PHP support to, and select Properties. Check the 'Execute' + checkbox, and confirm. + + + + + + + If you choose the ISAPI module, do the following: + + + + Edit the enclosed pws-php4isapi.reg + file (look into the sapi dir) to reflect the location of + your php4isapi.dll. Forward slashes should be escaped, for example: + [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="C:\\PHP\\sapi\\php4isapi.dll" - Click the Configuration button, and then click the App - Mappings tab. + In the PWS Manager, right click on a given directory you want to + add PHP support to, and select Properties. Check the 'Execute' + checkbox, and confirm. + + + + + + + + + Windows NT/2000 and IIS 4 or newer + + + To install PHP on an NT/2000 Server running IIS 4 or newer, + follow these instructions. You have two options to set up + PHP, using the CGI binary (php.exe) or with the ISAPI module. + + + + In either case, you need to start the Microsoft Management + Console (may appear as 'Internet Services Manager', either + in your Windows NT 4.0 Option Pack branch or the Control + Panel->Administrative Tools under Windows 2000). Then + right click on your Web server node (will most probably + appear as 'Default Web Server'), and select 'Properties'. + + + + Now if you want to use the CGI binary, do the following: + + + + Under 'Home Directory', 'Virtual Directory', or + 'Directory', click on the 'Configuration' button, + and then enter the App Mappings tab. Click Add, and in the Executable box, type: - c:\path-to-php-dir\php.exe %s %s. You MUST - have the %s %s on the end, PHP will not function properly if - you fail to do this. - + c:\php\php.exe %s %s (assuming + that you have unziped PHP in c:\php\). You MUST + have the %s %s on the end, PHP will not function + properly if you fail to do this. + In the Extension box, type the file name extension you want - associated with PHP scripts. (You must repeat step 5 and 6 for - each extension you want accociated with PHP - scripts. (.php and - .phtml are common.) + associated with PHP scripts. Leave 'Method exclusions' + blank, and check the Script engine checkbox. + You must repeat step 3 and 4 for each extension you + want accociated with PHP scripts. + (.php and .phtml + are common.) @@ -3780,9 +3926,40 @@ Paul Mckay. - + + + To use the ISAPI module, do the following: + + + + If you don't want to perform HTTP Authentication using PHP, + you can (and should) skip this step. Under ISAPI Filters, + add a new ISAPI filter. Use PHP as the filter name, and + supply a path to the php4isapi.dll. + + + + + Under 'Home Directory', click on the 'Configuration' button. + Add a new entry to the Application Mappings. Use the path + to the php4isapi.dll as the Executable, supply .php as the + extension, leave Method exclusions blank, and check the + Script engine checkbox. + + + + + Stop IIS completely + + + + + Start IIS again + + + + - @@ -3802,7 +3979,7 @@ Paul Mckay. Instructions for Sun Solaris 2.6 with Netscape Enterprise Server 3.6 -from: bhager@invacare.com +From: bhager@invacare.com 1. Install the following packages from www.sunfreeware.com or another download site: @@ -3828,7 +4005,7 @@ download site: 5. cd ../php-x.x.x 6. For the following step, make sure /opt/netscape/suitespot/ is where -your netscape server is installed. Otherwise, change to correct path: + your netscape server is installed. Otherwise, change to correct path: /configure --with-mysql=/usr/local/mysql --with-nsapi=/opt/netscape/suitespot/ --enable-track-vars --enable-libgcc 7. make 8. make install @@ -3840,8 +4017,8 @@ your netscape server is installed. Otherwise, change to correct path: Firstly you may need to add some paths to the LD_LIBRARY_PATH - environment for netscape to find all the shared libs. This can - best done in the start script for your netscape server. + environment for Netscape to find all the shared libs. This can + best done in the start script for your Netscape server. Windows users can probably skip this step. The start script is often located in: Configuration Instructions for Netscape Enterprise Server -from: bhager@invacare.com +From: bhager@invacare.com 1. Add the following line to mime.types: type=magnus-internal/x-httpd-php exts=php 2. Add the following to obj.conf, shlib will vary depending on -your OS, for unix it will be something like -/opt/netscape/suitespot/bin/libphp4.so. -You should place the following lines after mime types init. + your OS, for unix it will be something like + /opt/netscape/suitespot/bin/libphp4.so. + + You should place the following lines after mime types init. Init fn="load-modules" funcs="php4_init,php4_close,php4_execute,php4_auth_trans" shlib="/php4/nsapiPHP4.dll" Init fn=php4_init errorString="Failed to initialize PHP!" @@ -3914,7 +4092,7 @@ You should place the following lines after mime types init. OmniHTTPd Server installs - This section contains notes and hints specific OmniHTTPd. + This section contains notes and hints specific to OmniHTTPd. OmniHTTPd 2.0b1 and up for Windows @@ -3927,7 +4105,7 @@ You should place the following lines after mime types init. - Step 1: Install Omni server. + Step 1: Install OmniHTTPd server. @@ -3944,13 +4122,15 @@ You should place the following lines after mime types init. Step 4: On the 'External' tab, enter: virtual = .php - | actual = c:\path-to-php-dir\php.exe + | actual = c:\path-to-php-dir\php.exe, and use the Add + button. Step 5: On the Mime tab, enter: - virtual = wwwserver/stdcgi | actual = .php + virtual = wwwserver/stdcgi | actual = .php, + and use the Add button. @@ -3962,21 +4142,121 @@ You should place the following lines after mime types init. - Repeat steps 2 - 6 for each extension you want to associate with - PHP. + Repeat steps 2 - 6 for each extension you want to associate with PHP. - + + + Some OmniHTTPd packages come with built in PHP support. + You can choose at setup time to do a custom setup, and + uncheck the PHP component. We recommend you to use the latest + PHP binaries. Some OmniHTTPd servers come with PHP 4 beta + distributions, so you should rather choose not to set up + the built in support, but install your own. If the server + is already on your machine, use the Replace button in Step + 4 and 5 to set the new information. + + - + + Oreilly Website Pro Server installs + + This section contains notes and hints specific to Oreilly + Website Pro. + + + Oreilly Website Pro 2.5 and up for Windows + + + This list describes how to set up the PHP CGI binary + or the ISAPI module to work with Oreilly Website Pro + on Windows. + + + + + + + Edit the Server Properties and select the tab "Mapping". + + + + + From the List select "Associations" and enter the desired + extension (".php") and the path to the CGI exe + (ex. c:\php\php.exe) or the ISAPI dll file + (ex. c:\php\sapi\php4isapi.dll). + + + + + Now select "Content Types" add the same extension ".php" + and enter the content type. If you choose the CGI exe + file, enter 'wwwserver/shellcgi', if you chosse the + ISAPI module, enter 'wwwserver/isapi' (both without + quotes). + + + + + + + + + Xitami Server installs + + This section contains notes and hints specific to Xitami. + + + Xitami for Windows + + + This list describes how to set up the PHP CGI binary + to work with Xitami on Windows. + + + + + + + Make sure the webserver is running, and point + your browser to xitamis admin console + (usually http://127.0.0.1/admin), and click on + Configuration. + + + + + Now navigate to the Filters, and put the + extension which php should parse (i.e. .php) + into the field File extensions (.xxx). + + + + + In Filter command or script put the path and name + of your php executable i.e. c:\php\php.exe. + + + + + Press the 'Save' icon. + + + + + + + Other web servers PHP can be built to support a large number of web servers. Please see Server-related options for a full list of server-related configure - options. + options. The PHP CGI binaries are compatible with almost all + webservers supporting the CGI interface.