php安装oracle扩展方法
1、这两个包是必须安装的rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpmrpm -ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
2、rpm -ivh oracle-instantclient11.2-*
3、ln -s /usr/include/oracle/11.2/client64 /usr/include/oracle/11.2/clientln -s /usr/lib/oracle/11.2/client64 /usr/lib/oracle/11.2/client
4、编辑配置文件vi /etc/profile.d/oracle.shexport ORACLE_HOME=/usr/lib/oracle/11.2/client64髫潋啜缅export LD_LIBRARY_PATH=$ORACLE_HOME/libsource/etc/profile.d/oracle.sh
5、获取PDO_OCI-1.0.tgztar -xvf PDO_OCI-1.0.tgzcd PDO_OCI-1.0
6、需要编辑ODI_OCI-1.0文件芾卤伲鹤夹里的config.m4文件来让它支持11geliftest-f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX忧溲枷茫_NAME.11.2; thenPDO_OCI_VERSION=11.2# 在第101行左右添加这几行:11.2)PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD);;
7、[root@vm-122-242 PDO_OCI-1.0]# /usr/local/php/bin/phpize Configuring for:PHP Api Version: 20131106Zend Module Api No: 20131226Zend Extension Api No: 220131226[root@vm-122-242 PDO_OCI-1.0]# ./configure --with-pdo-oci=instantclient,/usr,11.2 --with-php-config=/usr/local/php/bin/php-config
8、make && make install
9、报错"error: unknown type name ‘function_entry’"
10、Just Change function_entry To zend_function_entry in your pdo_oci.c file将pdo_oci.c file 中的function_entry改成zend_function_entry34行左右保存并退出
11、扩展安装成功