OS:linux slackware
PHP: php 5.1.2
Apache:apche 2.2.4


Oracle 10g Instant Client
PHP連結到Oracle 使用OC8I函式
要在Apache上 Instant Client 與 PHP運用
1.下載Oracle Instant oracle-instantclient-develClient ,Apache server,php
Orcle Instant
http://www.oracle.com/technology/tech/oci/instantclient/index.html
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html
下載 instant Client Package - Basic
     instant Client Package - SDK

rpm -Uvh oracle-instantclient-basic-10.2.0.4-1.i386.rpm
    放在 /usr/lib/oracle/10.2.0.4/client
rpm -Uvh oracle-instantclient-devel-10.2.0.4-1.i386.rpm
    放在 /usr/include/oracle/10.2.0.4/client
    cd /usr/include/oracle/10.2.0.4/client
    cp * /usr/include
以下三個有些說要裝有些沒說到.我是有裝
oracle-instantclient-jdbc-10.2.0.4-1.i386.rpm
oracle-instantclient-odbc-10.2.0.4-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm


ln -s libclntsh.so.10.1 libclntsh.so
ln -s libocci.so.10.1 libocci.so
==================== 讓php可用oc8i ======================
make方式請參考 apache2 php5 mysql5安裝配置只是把mysql改成oci8

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-debug --with-oci8-instant-client=/usr/include/oracle/10.2.0.4/client --with-oci8=instantclient,/usr/lib/oracle/10.2.0.4/client/lib

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-debug --with-oci8-instant-client=/usr/include/oracle/10.2.0.4/client --with-oci8=instantclient,/usr/lib/oracle/10.2.0.4/client/lib --with-curl=/usr/include/curl --enable-ftp --with-libxml-dir=/usr/include/libxml2 --with-expat-dir=/usr/lib --enable-soap --with-xsl=/usr/include/libxslt --enable-xslt --with-gd=/usr/local/gd2/ --with-jpeg-dir=/usr/local/jpeg6/ --with-zlib-dir=/usr/local/lib/ --with-png=/usr/local/lib/ --with-freetype-dir=/usr/include/freetype/


================安裝oci8============================
下載 oci8
http://pecl.php.net/package/oci8
oci8-1.3.0.tgz
tar xvfz oci8-1.3.0.tgz
cd oci8-1.3.0
/usr/local/php/bin/phpize
./configure --with-oci8=instantclient,/usr/lib/oracle/10.2.0.4/client/lib
make
make install
=======================================================
修改php.ini中extension_dir目錄
   extension_dir = /usr/local/php/lib/php/extensions/
 
加入
extension = oci8.so

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 horace1123 的頭像
    horace1123

    貓熊打滾

    horace1123 發表在 痞客邦 留言(0) 人氣()