Hi!
I had some trouble compiling php4 with oci8 support and apache but finally managed it with some tricks.
I used the following versions on our system, but it might work for others too:
- Tru64 Unix (Alpha)
- oracle 8.1.7
- php-4.0.4pl1
- apache-1.3.19
Look at the error message. If you get an error similar to this one my solution might help you:
cc: Error: /vol01/app/oracle/product/817/rdbms/demo/ocikpr.h, line 44: In this declaration, parameter 2 has a different type than specified in an earlier declaration of this function. (mismatparam)
sword obindps( /_ struct cda_def cursor, ub1 opcode, OraText *sqlvar,
-------^
You can see, that the parameters for the function obindps are commented out. If you check the header file ocikpr.h, you'll see that all function parameters are commented out. I had a look at oci.h and found at the bottom the following lines:
#if defined(STDC) || defined(__cplusplus)
#include <ociapr.h>
#include <ociap.h>
#else
#include <ocikpr.h>
#include <ocikp.h>
#endif
Here you can see that if STDC or __cplusplus are not defined then ocikpr.h and ocikp.h are included (with commented-out function parameters). My idea was to tell the compiler that it should use strict ANSI-C.
On Tru64 Unix (with DEC compiler) I did something like that:
setenv DEC_CC -std1
Now it should compile fine and include ociapr.h and ociap.h instead.
After that I had to unset DEC_CC after installing, because apache didn't like that.
I hope this helps you.
Bye,
Andreas Hochsteger