注:本文適用于RHEL/CentOS發(fā)行版。
步驟1.安裝構(gòu)建自定義PHP 7模塊所需的devel包
# yum install plesk-php70-devel gcc glibc-devel libmemcached-devel zlib-devel make libaio.x86_64
步驟2.下載oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm和oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm(來自O(shè)racle OTN),并將其上傳到服務(wù)器上。、
https://www.jb51.net/database/572638.html
步驟3.安裝oracle-instantclient12 *包:
# rpm -Uhv oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
步驟4.用pecl安裝oci8包
# /opt/plesk/php/7.0/bin/pecl install oci8
步驟5.在php.ini中啟用oci8模塊
# echo "extension=oci8.so" > /opt/plesk/php/7.0/etc/php.d/oci.ini
要為通過Plesk安裝的其他PHP引擎安裝oci8擴(kuò)展,請(qǐng)為相應(yīng)的PHP版本安裝PHP devel包。
例如,對(duì)于PHP 7.2:
# yum install plesk-php72-devel
重復(fù)上面的步驟4,5,確保路徑是當(dāng)前PHP版本的:
# /opt/plesk/php/7.2/bin/pecl install oci8
# echo "extension=oci8.so" > /opt/plesk/php/7.2/etc/php.d/oci.ini
檢查擴(kuò)展是否已啟用:
# /opt/plesk/php/7.2/bin/php -m | grep oci
oci8
您可能感興趣的文章:- php框架CI(codeigniter)自動(dòng)加載與自主創(chuàng)建對(duì)象操作實(shí)例分析
- 關(guān)于PHP5.6+版本“No input file specified”問題的解決
- php過濾htmlspecialchars() 函數(shù)實(shí)現(xiàn)把預(yù)定義的字符轉(zhuǎn)換為 HTML 實(shí)體用法分析
- nginx+php出現(xiàn)No input file specified解決辦法
- PHP htmlspecialchars()函數(shù)用法與實(shí)例講解
- PHP htmlspecialchars_decode()函數(shù)用法講解
- PHP htmlspecialchars() 函數(shù)實(shí)例代碼及用法大全
- PHP之CI框架學(xué)習(xí)講解