After 2 days getting the above to work, I thought I'd share my findings. I have
PHP 4.0.3
Apache 1.3.14
Solaris 2.7
Oracle 8.1.6
The biggest problem I found was in building Apache to include the php library. Fundamentall, this is because the Apache build routines were never expecting to have to link in Oracle libraries ... so they don't. The result is a whole bunch of ld errors when linking httpd.
After reverse engineering the php scripts, I finally found the following compiler invocation to work ...
gcc -DSOLARIS2=270 -DUSE_EXPAT -I./lib/expat-lite \
-I/uni/app/oracle/product/8.1.6/rdbms/public \
-I/uni/app/oracle/product/8.1.6/rdbms/demo \
-I/uni/app/oracle/product/8.1.6/network/public
-DNO_DL_NEEDED ./apaci \
-L/uni/app/oracle/product/8.1.6/lib -o httpd \
buildmark.o modules.o modules/php4/libphp4.a modules/standard/libstandard.a \
main/libmain.a ./os/unix/libos.a ap/libap.a lib/expat-lite/libexpat.a \
-lpam -ldl -lclntsh -lsched -ldl -lgen -lsocket -lnsl -lresolv \
-lresolv -lm -ldl -lcrypt -lnsl -lsocket -lsocket -lpam -ldl -lclntsh \
-lsched -ldl -lgen -lsocket -lnsl -lresolv -lresolv -lm -ldl -lcrypt -lnsl \
-lsocket -lsocket -R/usr/ucblib -R/uni/app/oracle/product/8.1.6/lib \
-R/usr/ucblib -R/uni/app/oracle/product/8.1.6/lib
Two other problems I found were ...
1) When building httpd, the apache Makefile tries to unnecessarily recompile php.c, and fails because it can't find the header file.
- solution is to touch php.o to obviate the recompilation
2) When building httpd, ld fails with unresolved references to modphp4.
- edit src/modules/modules.c to change all occurrences of modphp4 to php4.
Hope this helps