Tuesday, August 24, 2010

Compiled new oci8(1.4.3) in PHP(5.3.3)

How to compile new oci8 in PHP source?
oci8(PHP) is extension for Oracle Database allows you to access Oracle databases. It can be built with PHP 4.3.9 to 5.x. It can be linked with Oracle 9.2, 10.2, 11.1, or 11.2 client libraries.
When we find new version (oci8) and want to upgrade in PHP, How?
If we want to use oci8 1.4.3. we may wait PHP version 6.0.0 or older (but OCI8 1.4.2 is included in PHP 5.3.3).
So, download oci8 1.4.3 and compile in php 5.3.3:
- check PHP source path.
# pwd
/SRC/php-5.3.3
- check old configuration.
# cat config.nice

#! /bin/sh
#
# Created by configure

'./configure' \
'--with-apxs2=/usr/local/apache/bin/apxs' \
'--with-oci8=instantclient,/u01/app/instantclient_11_2' \
"$@"
- move old oci8 and use new oci8 (1.4.3)
# mv ext/oci8 ext/oci8-org
# ls ../oci8-1.4.3.tgz
../oci8-1.4.3.tgz
# tar zxvf ../oci8-1.4.3.tgz -C ext/
# mv ext/oci8-1.4.3 ext/oci8
# make clean && make
# /usr/local/apache/bin/apachectl stop
# make install
# /usr/local/apache/bin/apachectl start
- check again.
we will see new version(oci8).

No comments: