php扩展
php扩展
sqlserver扩展
下载对应版本dll
找到适合7.4.2 win32 ts版本的dll:
将对应dll拷贝到php/ext下面:
重命名为php_pdo_sqlsrv.dll和php_sqlsrv.dll
修改php.ini:
新增:
1
2 extension=pdo_sqlsrv
extension=sqlsrv
重启apache
win10 oci
安装包:
- **apache2:**https://www.apachelounge.com/download/VS16/binaries/httpd-2.4.53-win32-VS16.zip
- **php7.4:**https://windows.php.net/downloads/releases/php-7.4.28-Win32-vc15-x86.zip
- **oci扩展:**https://windows.php.net/downloads/pecl/releases/oci8/2.2.0/php_oci8-2.2.0-7.4-ts-vc15-x86.zip
- **oracle客户端:**https://download.oracle.com/otn/nt/instantclient/122010/instantclient-basic-nt-12.2.0.1.0.zip?AuthParam=1647777076_1011881deb66a615a151e3ca0d29a844
将oracle客服端下的dll复制到system/win32和wow64文件夹下
配置环境变量:
- NLS_LANG:AMERICAN_AMERICA.WE8MSWIN1252
- ORACLE_HOME和ORACLE_HOME_path:C:\apache2\instantclient_12_2\32
- TNS_ADMIN:C:\apache2\instantclient_12_2\32
运行安装命令:phpd.exe -k install
注意:全32位,nt版
mamp安装oci8
mac安装OCI8扩展
-
环境
-
安装Oracle Instant Client
- 准备工作
- 开始安装
-
.配置php.ini
1. 环境
- MacOs:10.14
- MAMP PRO:5.1(16575)
- php:5.4.45
2. 安装Oracle Instant Client
3. 准备工作
在Oracle官网下载Oracle Instant Client相关文件(需使用oracle账户登录,并同意相关协议)。
以12.2.0.1.0-2版本为例,需要下载以下文件
- instantclient-basic-macos.x64-12.2.0.1.0-2.zip
- instantclient-sdk-macos.x64-12.2.0.1.0-2.zip
- instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip
将以上文件解压到/usr/lib/oracle/12.2
/usr/lib/oracle/12.2/
├── BASIC_README
├── SQLPLUS_README
├── adrci
├── genezi
├── glogin.sql
├── libclntsh.dylib -> libclntsh.dylib.12.1
├── libclntsh.dylib.12.1
├── libclntshcore.dylib.12.1
├── libnnz12.dylib
├── libocci.dylib -> libocci.dylib.12.1
├── libocci.dylib.12.1
├── libociei.dylib
├── libocijdbc12.dylib
├── libons.dylib
├── liboramysql12.dylib
├── libsqlplus.dylib
├── libsqlplusic.dylib
├── ojdbc8.jar
├── sdk
│ ├── SDK_README
│ ├── admin
│ │ └── oraaccess.xsd
│ ├── demo
│ │ ├── cdemo81.c
│ │ ├──** **demo.mk** │ │ ├── occidemo.sql│ │ ├── occidemod.sql│ │ ├── occidml.cpp│ │ ├── occiobj.cpp│ │ ├── occiobj.typ│ │ ├── oraaccess.xml│ │ └── **setuporamysql.sh
│ ├── include
│ │ ├── ldap.h
│ │ ├── nzerror.h
│ │ ├── nzt.h
│ │ ├── occi.h
│ │ ├── occiAQ.h
│ │ ├── occiCommon.h
│ │ ├── occiControl.h
│ │ ├── occiData.h
│ │ ├── occiObjects.h
│ │ ├── oci.h
│ │ ├── oci1.h
│ │ ├── oci8dp.h
│ │ ├── ociap.h
│ │ ├── ociapr.h
│ │ ├── ocidef.h
│ │ ├── ocidem.h
│ │ ├── ocidfn.h
│ │ ├── ociextp.h
│ │ ├── ocikpr.h
│ │ ├── ocixmldb.h
│ │ ├── ocixstream.h
│ │ ├── odci.h
│ │ ├── oratypes.h
│ │ ├── ori.h
│ │ ├── orid.h
│ │ ├── orl.h
│ │ ├── oro.h
│ │ ├── ort.h
│ │ └── xa.h
│ ├── ott
│ └── ottclasses.zip
├── sqlplus
├── uidrvci
└── xstreams.jar
4 directories, 63 files
4. 开始安装
4.1. 进入到当前php的bin目录
1
2
3
4 cd /Applications/MAMP/bin/php/php5.4.45/bin
Use 'pecl install oci8-2.0.12' to install for PHP 5.2 - PHP 5.6.
Use 'pecl install oci8-1.4.10' to install for PHP 4.3.9 - PHP 5.1.
./pecl install oci8-2.0.12
以下为显示内容
1
2
3
4
5
6
7
8
9
10 downloading oci8-2.0.12.tgz ...
Starting to download oci8-2.0.12.tgz (191,954 bytes)
.........................................done: 191,954 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] :
在上面的:后面输入以下内容
1 instantclient,/usr/lib/oracle/12.2
以下为显示内容
1
2
3
4
5 Build process completed successfully
Installing '/Applications/MAMP/bin/php/php5.4.45/lib/php/extensions/no-debug-non-zts-20100525/oci8.so'
install ok: channel://pecl.php.net/oci8-2.0.12
configuration option "php_ini" is not set to php.ini location
You should add "extension=oci8.so" to php.ini
5. 配置php.ini
1
2 cd ~/Library/Application\ Support/appsolute/MAMP\ PRO/templates/
vi php5.4.45.ini.temp
添加extension=oci8.so
————————————————
1
2 cd /Applications/mamp/bin/php/php7.4.21/bin
instantclient,/Users/pan/code/jre/instantclient_12_2
gradle使用国内地址
延伸阅读:
CentOS 7.9挂载WebDAV
CentOS 7.9挂载WebDAV在CentOS 7.9上挂载WebDAV,您可以使用davfs2这个工具。davfs...
VMware虚拟机安装android-x86_64
VMware虚拟机安装android-x86_64使用虚拟机安装android-x86_64-7.1-rc1.iso工具...