This install procedure is based on apache 1.3.12 and PHP 3.0.16, but is identical back at least to apache 1.3.6 and php 3.0.9. The PHP4 from beta 3 will have a configure option to use unixODBC so most of the following will be redundant.
This document assumes that unixODBC has been built and installed, in this case in the default location /usr/local, and that both Apache and PHP have been untarred in the users home directory.
./configure --prefix=/wwwplus any other local config you need
#include <sql.h> #include <sqlext.h> #include <odbcinst.h>replacing /www with your desired apache install path
CFLAGS="-I/usr/local/include" LDFLAGS= CUSTOM_ODBC_LIBS="-L/usr/local/lib -lodbc"remember to export these variables
export CFLAGS LDFLAGS CUSTOM_ODBC_LIBS
./configure --with-apache=../apache_1.3.12 --with-custom-odbc=/usr/local --enable-track-varsplus any other local config you need then...
make make install
./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a make make install
cp php3.ini-dist /usr/local/lib/php3.ini You can edit /usr/local/lib/php3.ini file to set PHP options. Edit your httpd.conf or srm.conf file and add: AddType application/x-httpd-php3 .php3
There are two ways around this ether define and export the following environment vars before building apache
export CFLAGS=-D_REENTRANT export LFLAGS=-lpthread ./configure --prefix=wwwor rebuild unixODBC without thread support by configuring ./configure --enable-threads=no
In both cases remember to delete the file config.cache from the root directory of Apache or unixODBC
If this is of any help to someone, good, any problems let me know.
Nick Gorham