Here are some patches and notes for Apache and PHP.
php.ini file at kics.bc.ca)
http://example.com/foo.php works but
http://example.com/foo.php/bar causes an internal server
error. /etc/make.conf for Apache 1.3.27:
WITH_APACHE_SUEXEC=yes APACHE_SUEXEC_DOCROOT=/home DEFAULT_PATH=/usr/local/bin:/usr/bin:/bin:/var/qmail/bin
PGPREFIX=/usr/local
export PGPREFIX
./configure --enable-force-cgi-redirect --enable-trans-sid --enable-sockets \
--enable-ftp --with-zlib --with-gd \
--with-mhash=/usr/local --with-mcrypt=/usr/local \
--with-mysql=/usr/local --with-pgsql=/usr/local
--with-pear --enable-shared \
&& make
# LD_LIBRARY_PATH=$ORACLE_HOME/lib \ CC=/compat/linux/usr/bin/gcc \ ./configure --enable-force-cgi-redirect --with-pear --enable-static --with-oci8 # vi main/php_config.h --- comment out #define HAVE_OCI8_ATTR_STATEMENT 1 --- # make # cp -p sapi/cgi/php /usr/local/bin/php-4.3.0-oci8.cgi # cp -p sapi/cli/php /usr/local/bin/php-4.3.0-oci8
#!/compat/linux/bin/sh
export LD_LIBRARY_PATH=/oracle/HOME/lib
export ORACLE_BASE=/oracle
export ORACLE_HOME=/oracle/HOME
export ORACLE_SID=ORCL
export ORACLE_TERM=386x
echo Content-type: text/html
echo
exec /usr/local/bin/php-oci8 <<'EOF'
<?
echo "OCILogon<P>";
$db="";
$conn=OCILogon("scott","tiger");
echo "OCIServerVersion<P>";
echo ociserverversion($conn); echo "<P>";
echo "OCIParse<P>";
$stmt=OCIParse($conn,"SELECT * FROM foo");
echo "OCIExecute<P>";
if(OCIExecute($stmt)) {
echo "Being executed wasn't so bad<P>";
}
?>
Note: None of this stuff has any kind of warranty.