This file includes instructions on building Apache with PHP and ODBC
support provided by the Easysoft ODBC-ODBC Bridge.

The Easysoft ODBC-ODBC Bridge has been proven with Apache 1.3.n and
PHP 3.0.0 - 3.0.12 although it may work with other versions.

Building PHP and Apache with OOB
================================

Please read the INSTALL files in the PHP and Apache distributions before
following these instructions as they may provide more uptodate information
on Apache and PHP specifics.

The example below assumes you gave /usr/local as the installation path
for the ODBC-ODBC Bridge. If this is not the case then please change
/usr/local to the installation path specified when the ODBC-ODBC Bridge
was installed.

To build PHP with Apache and OOB you should follow this recipe: 

1. Download Apache. (see http://www.apache.org).
2. Dowload PHP. (see http://www.php.net)
3. Refer to the instructions in php-3.n.m/INSTALL and
   apache_1.3.x/INSTALL. In particular, php-3.n.m/INSTALL shows step by
   step instructions for building with mysql. To build PHP with the
   Easysoft ODBC-ODBC Bridge you must replace "--with-mysql" with
   "--with-custom-odbc=/base_oob_install_dir/easysoft/oob/client where
   /base_oob_install_dir is the base directory where OOB was installed.
   You must also define the environment variable CUSTOM_ODBC_LIBS as
   CUSTOM_ODBC_LIBS="-lesoobclient" and export it or if
   using the bash shell prefix the PHP configure line with
   CUSTOM_ODBC_LIBS="-lesoobclient".
4. When configuring Apache you need to add define the environment variable
   LDFLAGS as
     -L/base_oob_install_dir/oob/easysoft/client
   Export this before running the Apache configure.
5. Currently, OOB shared objects are not built with a dynamic linker
   run path so if you are on a UNIX and non-Linux machine you need to
   set LD_LIBRARY_PATH before building or running Apache. You can do
   this in the Bourne shell with:

   LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/easysoft/oob/client:/usr/local/easysoft/lib
   export LD_LIBRARY_PATH

   (you may need to amend this for the install path or for different shells).

Here is a log of a typical build process: 

martin /work/builds-> cd apache_1.3.3
martin /work/builds/apache_1.3.3-> ./configure --prefix=/httpx
Configuring for Apache, Version 1.3.3
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
 + doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/main
Creating Makefile in src/ap
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/modules/standard
martin /work/builds/apache_1.3.3-> cd ../php-3.0.6/
martin /work/builds/php-3.0.6-> CUSTOM_ODBC_LIBS="-lesoobclient" \
    ./configure --with-custom-odbc=/usr/local/easysoft/oob/client \
    --with-apache=../apache_1.3.3 --enable-track-vars
martin /work/builds/php-3.0.6-> make
 <output from make omitted for brevity>
martin /work/builds/php-3.0.6-> make install
mkdir -p ../apache_1.3.3/src/modules/php3; cp libmodphp3.a ./mod_php3.* ./php_version.h ../apache_1.3.3/src/modules/php3; cp ./apMakefile.tmpl ../apache_1.3.3/src/modules/php3/Makefile.tmpl; cp ./apMakefile.libdir ../apache_1.3.3/src/modules/php3/Makefile.libdir; cp libphp3.module ../apache_1.3.3/src/modules/php3
martin /work/builds/php-3.0.6-> cd ../apache_1.3.3/
martin /work/builds/apache_1.3.3-> LDFLAGS=-L/usr/local/easysoft/oob/client \
    ./configure --prefix=/httpx \
    --enable-module=info --enable-module=log_referer \
    --enable-module=mime_magic --enable-module=status \
    --activate-module=src/modules/php3/libphp3.a
Configuring for Apache, Version 1.3.3
 + activated php3 module (modules/php3/libphp3.a)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
    o php3_module uses ConfigStart/End
 + doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/main
Creating Makefile in src/ap
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/modules/standard
Creating Makefile in src/modules/php3
martin /work/builds/apache_1.3.3-> make
 <output from make omitted for brevity>
martin /work/builds/apache_1.3.3-> make install
