时间:2021-07-01 10:21:17 帮助过:5人阅读
rpm -ivh oracle-instantclient-basic-11.1.0.1-1.i386.rpm
vi /etc/ld.so.conf.d/oracle-lib.conf
内容如下
/usr/lib/oracle/11.1.0.1/client/lib
运行
ldconfig
rpm -ivh oracle-instantclient-devel-11.1.0.1-1.i386.rpm
确定apache对pthread的支持
ldd /usr/sbin/httpd | grep libpthread
如果不支持,需要重新编译apache
UnixWare等会不支持libpthread,但是支持libthread
进入php代码的ext/oci8目录
/usr/local/php/bin/phpize
./configure ?with-php-config=/usr/local/php/bin/php-config ?with-oci8=/usr/lib/oracle/11.1.0.1/client/
cp /usr/include/oracle/11.1.0.1/client/* ./
make
make install
将oci8.so复制到php的extension_dir下
并且在配置文件中加入支持
FAQ:
Q:configure时报错:checking Oracle version… configure: error: Oracle-OCI8 needed libraries not found
A:./configure ?with-php-config=/usr/local/php/bin/php-config ?with-oci8=/usr/lib/oracle/11.1.0.1/client/
Q:make时出错
A:缺少oracle-instantclient-devel