PHP 4.x Win32 Documentation

Requirements Support Installation Adding Extensions

PHP 4.0 for Windows comes in two flavours - a CGI executable (php.exe), and an ISAPI module (php4isapi.dll). The latter is new to PHP 4.0, and provides significantly improved performance and some new functionality. However, please note that the ISAPI module is *NOT* yet considered to be production quality. The reason for this is that the PHP ISAPI module uses the thread-safe version of the PHP code, which is completely new to PHP 4.0, 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 ISAPI module, 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 ISAPI module with the stability of the CGI executable.

A number of modules are built in by default theres are:

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

Requirements

Support.

For questions and help with PHP under Windows, your best bet would be the PHP-Windows mailing list (php-windows@lists.php.net). To subscribe, send an empty message to php-windows-subscribe@lists.php.net.

Windows 95 requires the DCOM update, freely available from: http://download.microsoft.com/msdownload/dcom/95/x86/en/dcom95.exe

Installation

Unlike PHP 3, PHP 4 is divided into several components; Even when you use PHP in its CGI mode, php.exe is no longer a standalone executable, and relies on external DLLs for execution. For this reason, if you install php.exe as a handler for your web server, you must make sure that the DLLs in the distribution exist in a directory that is in the Windows PATH. The easiest way to do it is to copy these DLLs to your SYSTEM (Windows 9x) or SYSTEM32 (Windows NT) directory, which is under your Windows directory. The DLLs that need to be copied are MSVCRT.DLL (it may already exist in there) and PHP4TS.DLL.

IIS 4+5 ISAPI IIS 4+5 CGI PWS 4 ISAPI PWS 4 CGI Apache ORiley Website Pro Xitami

Installation Notes for IIS 4.0 and 5.0 - ISAPI method

Installation Notes for IIS 4.0 and 5.0 - CGI method

Installation Notes for Microsoft PWS 4.0 - ISAPI method

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map]

".php"="C:\\Program Files\\PHP\\php4isapi.dll"

At this point, PWS should have built-in PHP support.

Installation Notes for Microsoft PWS 4.0 - CGI method

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map]

".php"="C:\\Program Files\\PHP\\php.exe"

At this point, PWS should have built-in PHP support

Apache

Stop the Apache Webserver.

# for the apache module
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php4
#for the cgi binary (you can use that one compiled with force cgi redirect too)
ScriptAlias /php4/ "C:/php/"
Action application/x-httpd-php4 "/php4/php.exe"
AddType application/x-httpd-php4 .php

Oreilly Wesite Pro

cgi wwwserver/shellcgi
isapi wwwserver/isapi

Xitami

Adding Extensions

A few pre-compiled extensions are included in this release. You can load them by adding a line like the following to your php.ini file:

extension=path\to\extension\extension_name.dll

Loading these extensions extends the functionality of PHP to support more functions and protocols.

Note: MySQL support is *built-in* as of PHP 4.0. You don't need to load any additional extensions in order to use the MySQL functions.