《PHP實(shí)戰(zhàn):PHP下的Oracle客戶端擴(kuò)展(OCI8)安裝教程》要點(diǎn):
本文介紹了PHP實(shí)戰(zhàn):PHP下的Oracle客戶端擴(kuò)展(OCI8)安裝教程,希望對(duì)您有用。如果有疑問,可以聯(lián)系我們。
最近的項(xiàng)目需要用php拜訪oracle數(shù)據(jù)庫,不得不在linux下給php安裝oci8擴(kuò)展.php也可以使用pdo拜訪oracle數(shù)據(jù)庫,但還是需要安裝客戶端.PHP學(xué)習(xí)
首先到oracle官網(wǎng)的這個(gè)頁面下載相關(guān)的文件,注意要連數(shù)據(jù)庫服務(wù)器的版本,一定要對(duì)應(yīng),否則安裝成功也會(huì)連不上,同時(shí)也要區(qū)分32位、64位服務(wù)器,好比我要連的數(shù)據(jù)庫服務(wù)器是oracle10.2.0.4,64位主機(jī),那么我要下載下面三個(gè)文件:PHP學(xué)習(xí)
1.用以下命令安裝PHP學(xué)習(xí)
2.安裝OCI8 PHP擴(kuò)展 PHP學(xué)習(xí)
3.然后執(zhí)行命令PHP學(xué)習(xí)
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
?? - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
???? during execution
?? - add LIBDIR to the `LD_RUN_PATH' environment variable
???? during linking
?? - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
?? - have your system administrator add LIBDIR to `/etc/ld.so.conf'PHP學(xué)習(xí)
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Installing shared extensions:???? /usr/local/php5/lib/php/extensions/no-debug-zts-20090626/
# cd /usr/local/php5/lib
PHP學(xué)習(xí)
4.創(chuàng)建ext目錄PHP學(xué)習(xí)
5.在php.ini里面加上extension=oci8.soPHP學(xué)習(xí)
如下:
PHP學(xué)習(xí)
重啟apache服務(wù):PHP學(xué)習(xí)
刷新測(cè)試頁面.發(fā)現(xiàn)oci8呈現(xiàn)了,則大功告成.
PHP學(xué)習(xí)
《PHP實(shí)戰(zhàn):PHP下的Oracle客戶端擴(kuò)展(OCI8)安裝教程》是否對(duì)您有啟發(fā),歡迎查看更多與《PHP實(shí)戰(zhàn):PHP下的Oracle客戶端擴(kuò)展(OCI8)安裝教程》相關(guān)教程,學(xué)精學(xué)透。維易PHP學(xué)院為您提供精彩教程。
轉(zhuǎn)載請(qǐng)注明本頁網(wǎng)址:
http://www.fzlkiss.com/jiaocheng/14722.html