How to build libphp4.so with oracle database library ?
691419Mar 17 2009 — edited Apr 3 2009Hi there ,
I am hoping to build a PHP+ORACLE enviroment to carry on performance testing,the configuration as belows:
Oracle Database 10.2.0.4 Release, Oracle Application Server 10.1.3.4, php 4.4.9.
Referring to http://www.oracle.com/technology/products/ias/ohs/htdocs/php_ohs.htm#4.2
1. tar xvf php-4.4.9.tar
2.Set the following environment variables ORACLE_HOME, OAS_HOME,PERL5LIB, LD_LIBRARY_PATH
export OAS_HOME=/home/oracle/ias1013
export ORACLE_HOME=/home/oracle/db1024
export PERL5LIB=$OAS_HOME/perl/lib/5.8.3:$OAS_HOME/perl/lib/site_perl/5.8.3
export LD_LIBRARY_PATH=/home/oracle/db1024/lib:$OAS_HOME/lib:$LD_LIBRARY_PATH
3.Edit the apxs file to modify the CFG_INCLUDE value in $OAS_HOME/Apache/Apache/bin/apxs
4.configure and install
cd /home/oracle/php-4.4.9
./configure with-apxs=$OAS_HOME/Apache/Apache/bin/apxs prefix=$OAS_HOME
with-config-file-path=$OAS_HOME/Apache/Apache/conf with-oci8=$ORACLE_HOME --disable-rpath
5.'configure' succeeded without any errors then issue "make install-sapi" at command prompt.
Once the make command is executed properly libphp4.so is generated at the /home/oracle/php-4.4.9/libs/ location and copied to $OAS_HOME/Apache/Apache/libexec/ location
6.Activates php4 module for http server by adding entry "LoadModule php4_module libexec/libphp4.so" in http server config file $OAS_HOME/Apache/Apache/conf/httpd.conf
7.Post install
cp /home/oracle/php-4.4.9/php.ini-dist $OAS_HOME/Apache/Apache/conf/php.ini
Navigate to the $OAS_HOME/Apache/Apache/conf. Edit the httpd.conf file as follows:
**************************************************************************
# And for PHP 4.x, use:
. . .
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps.
***************************************************************************
After i have done all above steps , i checked the dependency of share object file:libphp4.so
**************************************************************************
$ ldd libphp4.so
/usr/lib/libcwait.so (0x00e5f000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00aa5000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00979000)
libm.so.6 => /lib/tls/libm.so.6 (0x0041d000)
libdl.so.2 => /lib/libdl.so.2 (0x00f8b000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00b3e000)
libclntsh.so.10.1 => not found
libc.so.6 => /lib/tls/libc.so.6 (0x00458000)
/lib/ld-linux.so.2 (0x00930000)
***************************************************************************
"libclntsh.so.10.1 => not found" makes me very confused, i think it should be "libclntsh.so.10.1 =>/home/oracle/db1024/lib/libclntsh.so.10.1" as expected.
I am not sure the libraries uesed for building libphp4.so come from application server lib or database lib,
I will appreciate for your any helps!!
Regards,
Edward