PHP7.0 - 无法加载动态库 oci8.so (Ubuntu) [英] PHP7.0 - unable to load dynamic library oci8.so (Ubuntu)

查看:50
本文介绍了PHP7.0 - 无法加载动态库 oci8.so (Ubuntu)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照oracle Instant Client的安装说明进行后,php无法加载oci8扩展.

After following the install instructions for oracle instant client, php is not able to load the oci8 extension.
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst

I am getting an error.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libmql1.so: cannot open shared object file: No such file or directory in Unknown on line 0

I have verified both oci8.so and libmql1.so locations.

Am I missing something?

解决方案

I'm using Ubuntu 16.04 and php version 7.1

There are few directories in /usr/lib/php/ for example

20131226 for php5.6

20160303 for php7.1

so problem with me that, the oci8 extension got installed on the wrong ( a user lib folder for php7.2) so I had to remove the php 7.2 completly

sudo apt-get purge php7.2-common

then I had uninstall the oci8 by running following command

sudo pecl uninstall oci8

and install again by running the following command

sudo pecl install oci8

To check the configuration loaded you do

php-config --extension-dir

And make sure that all extension are installed in the correct extension directory.

Make changes in the /etc/php/7.1/apache2/php.ini and /etc/php/7.1/cli/php.ini

Check by running phpinfo(); You must see this, ignore the cli if that stills gives you same error as your web shows the extension is getting loaded.

这篇关于PHP7.0 - 无法加载动态库 oci8.so (Ubuntu)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆