《PHP實戰:PHP下的Oracle客戶端擴展(OCI8)安裝教程》要點:
本文介紹了PHP實戰:PHP下的Oracle客戶端擴展(OCI8)安裝教程,希望對您有用。如果有疑問,可以聯系我們。
最近的項目需要用php拜訪oracle數據庫,不得不在linux下給php安裝oci8擴展.php也可以使用pdo拜訪oracle數據庫,但還是需要安裝客戶端.PHP學習
首先到oracle官網的這個頁面下載相關的文件,注意要連數據庫服務器的版本,一定要對應,否則安裝成功也會連不上,同時也要區分32位、64位服務器,好比我要連的數據庫服務器是oracle10.2.0.4,64位主機,那么我要下載下面三個文件:PHP學習
1.用以下命令安裝PHP學習
2.安裝OCI8 PHP擴展 PHP學習
3.然后執行命令PHP學習
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學習
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學習
4.創建ext目錄PHP學習
5.在php.ini里面加上extension=oci8.soPHP學習
如下:
PHP學習
重啟apache服務:PHP學習
刷新測試頁面.發現oci8呈現了,則大功告成.
PHP學習
《PHP實戰:PHP下的Oracle客戶端擴展(OCI8)安裝教程》是否對您有啟發,歡迎查看更多與《PHP實戰:PHP下的Oracle客戶端擴展(OCI8)安裝教程》相關教程,學精學透。維易PHP學院為您提供精彩教程。