====================================================================== Building PHP with the Ice extension (Windows) ======================================================================Compiling PHP from source code on Windows is a tedious process, therefore we recommend that you download the precompiled dynamic Ice extension from the ZeroC web site (included in the Ice installer for Visual C++ 6.0) and use the binary PHP distribution if possible.If you prefer to build the Ice extension yourself, you must first understand the C run time dependency issues. Specifically, the Ice extension must use the same C run time as PHP5. Since the binary distribution of PHP5 available from php.net depends on the Visual C++ 6.0 run time DLL (MSVCRT), you must also build the Ice extension using Visual C++ 6.0 if you want to use Ice with this PHP distribution. This is the reason why the precompiled Ice extension is included in the Ice installer for Visual C++ 6.0, as attempting to use an Ice extension that was built with a newer compiler together with the binary PHP distribution results in undefined behavior.To use a later version of Visual C++, you must obtain (or build) PHP5 with the desired compiler, and use the same compiler to build the Ice extension. Refer to the PHP documentation for instructions on building PHP5 from source.Follow these instructions to build the Ice extension:1) Download the PHP5 binary archive or Windows installer and install the distribution.2) Download and extract the PHP5 sources (IcePHP requires the PHP header files).3) Open a command window.4) Set the ICE_HOME environment variable to the location of your Ice installation. For example: > set ICE_HOME=C:\Ice-3.2.1-VC605) Change to the IcePHP source directory.6) Open config\Make.rules.mak, review the comments, and make any necessary changes. In particular, you may need to change the values of PHP_HOME and PHP_BIN_HOME to refer to your PHP source and binary installations, respectively.7) Start NMAKE: > nmake /f Makefile.mak8) Upon successful completion, the IcePHP extension is created as bin\php_ice.dll (Release) or bin\php_iced.dll (Debug). ====================================================================== Installing the Extension ======================================================================To install the Ice extension, you must move the extension's shared library into PHP's extension directory. This directory is determined by the PHP configuration directive "extension_dir". You can determine the default value for this directive by running the command-line version of PHP with the -i option:> php -i ... extension_dir => C:\php5 => C:\php5 ...After successfully building the extension on Linux, the shared library is created as lib/IcePHP.so. On Windows, the DLL is created as bin/php_ice.dll (release) or bin/php_iced.dll (debug).Once you've copied the extension to PHP's extension directory, you will need to enable the extension in your PHP configuration. In the php.ini file, use the following directive on Linux:extension = IcePHP.soOn Windows, use this directive:extension = php_ice.dllYou can use the "php -i" command to determine the proper directory in which to place the php.ini file:> php -i ... Configuration File (php.ini) Path => C:\WINDOWS ...
Building PHP with the Ice extension (Windows)
======================================================================Compiling PHP from source code on Windows is a tedious process,
therefore we recommend that you download the precompiled dynamic
Ice extension from the ZeroC web site (included in the Ice installer
for Visual C++ 6.0) and use the binary PHP distribution if possible.If you prefer to build the Ice extension yourself, you must first
understand the C run time dependency issues. Specifically, the Ice
extension must use the same C run time as PHP5. Since the binary
distribution of PHP5 available from php.net depends on the Visual C++
6.0 run time DLL (MSVCRT), you must also build the Ice extension using
Visual C++ 6.0 if you want to use Ice with this PHP distribution. This
is the reason why the precompiled Ice extension is included in the Ice
installer for Visual C++ 6.0, as attempting to use an Ice extension
that was built with a newer compiler together with the binary PHP
distribution results in undefined behavior.To use a later version of Visual C++, you must obtain (or build) PHP5
with the desired compiler, and use the same compiler to build the Ice
extension. Refer to the PHP documentation for instructions on building
PHP5 from source.Follow these instructions to build the Ice extension:1) Download the PHP5 binary archive or Windows installer and install
the distribution.2) Download and extract the PHP5 sources (IcePHP requires the PHP
header files).3) Open a command window.4) Set the ICE_HOME environment variable to the location of your Ice
installation. For example: > set ICE_HOME=C:\Ice-3.2.1-VC605) Change to the IcePHP source directory.6) Open config\Make.rules.mak, review the comments, and make any
necessary changes. In particular, you may need to change the values
of PHP_HOME and PHP_BIN_HOME to refer to your PHP source and binary
installations, respectively.7) Start NMAKE: > nmake /f Makefile.mak8) Upon successful completion, the IcePHP extension is created as
bin\php_ice.dll (Release) or bin\php_iced.dll (Debug).
======================================================================
Installing the Extension
======================================================================To install the Ice extension, you must move the extension's shared
library into PHP's extension directory. This directory is determined
by the PHP configuration directive "extension_dir". You can determine
the default value for this directive by running the command-line
version of PHP with the -i option:> php -i
...
extension_dir => C:\php5 => C:\php5
...After successfully building the extension on Linux, the shared library
is created as lib/IcePHP.so. On Windows, the DLL is created as
bin/php_ice.dll (release) or bin/php_iced.dll (debug).Once you've copied the extension to PHP's extension directory, you
will need to enable the extension in your PHP configuration. In the
php.ini file, use the following directive on Linux:extension = IcePHP.soOn Windows, use this directive:extension = php_ice.dllYou can use the "php -i" command to determine the proper directory in
which to place the php.ini file:> php -i
...
Configuration File (php.ini) Path => C:\WINDOWS
...