继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

php连接oracle数据库

ajax入门学习视频
关注TA
已关注
手记 266
粉丝 80
获赞 597

Download:

instantclient-basiclite-linux.x64-11.2.0.3.0.zip http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

instantclient-sdk-linux.x64-11.2.0.3.0.zip

http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

oci8-1.4.10.tgz

http://pecl.php.net/package/oci8


Decompress and Compilation:

   unzip instantclient-basiclite-linux.x64-11.2.0.3.0.zip

unzip instantclient-sdk-linux.x64-11.2.0.3.0.zip

tar –zxvf oci8-1.4.10.tgz


cd instantclient_11_2

ln -slibclntsh.so.11.1 libclntsh.so


cd ..

mkdir /usr/lib/oracle/11.2/client64/lib

mv ./instantclient_11_2/*/usr/lib/oracle/11.2/client64/lib


cd oci8-1.4.10

phpize

./configure--with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib

make install  

# Here you can see like /usr/local/lib/php/extensions/no-debug-zts-20100525,next stop use


EditConfigurge:

php.ini

vim /data/usr/local/lib/php.ini

#Addori8.so path

extension=/usr/local/lib/php/extensions/no-debug-zts-20100525/oci8.so


/etc/profile

vim  /etc/profile

        #Add Environment Variables

        exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/11.2/client64/lib


echo “/usr/lib/oracle/11.2/client64/lib”> /etc/ld.so.conf.d/oracle.conf

source /etc/profile

ldconfig

Restart httpd server:

server httpd restart

      #just need reload php.ini

Reference material:

http://www.oracle.com/technetwork/articles/technote-php-instant-084410.html


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP