PHP 无法加载动态库“php_pdo_oci.dll”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22604780/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PHP unable to load dynamic library "php_pdo_oci.dll"
提问by birokrats
I'm running Apache 2.4.7 with PHP 5.5.9 on Windows 8. I installed PHPUnit and this warning image "warning" started to pop up.
我在 Windows 8 上运行 Apache 2.4.7 和 PHP 5.5.9。我安装了 PHPUnit,这个警告图像“警告”开始弹出。
Yes I enabled extension loading in php.ini as well as "extension_dir" to correct folder and there is file named "php_pdo_oci.dll" in that folder. I tried to use different apache and php releases, but it didn't help. Any suggestions how to fix this?
是的,我在 php.ini 和“extension_dir”中启用了扩展加载以更正文件夹,并且该文件夹中有名为“php_pdo_oci.dll”的文件。我尝试使用不同的 apache 和 php 版本,但没有帮助。任何建议如何解决这个问题?
回答by Joshua Kissoon
The ..._oci.dll is part of the Oracle C Interface. Unless you need to use Oracle, I suggest you go to the relevant line inside the php.ini file and uncomment the loading of this extension. However, if you need to use this extension, you'll need to install the free Oracle Client libraries and add them to the path.
..._oci.dll 是 Oracle C 接口的一部分。除非你需要使用Oracle,否则我建议你去php.ini 文件中的相关行并取消注释加载这个扩展。但是,如果您需要使用此扩展,则需要安装免费的 Oracle 客户端库并将它们添加到路径中。
Oracle has an article Installing PHP and the Oracle Instant Client for Linux and Windowson how to do this.
Oracle 有一篇关于如何执行此操作的文章为 Linux 和 Windows 安装 PHP 和 Oracle Instant Client。
回答by Udo E.
I currently have PHP version 7.1.9 and encountered this problem and resolved the issue. Just ensure these lines in your php.ini file are uncommented like so:
我目前的 PHP 版本是 7.1.9,遇到了这个问题并解决了这个问题。只需确保 php.ini 文件中的这些行被取消注释,如下所示:
extension=php_fileinfo.dll
extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
extension=php_openssl.dll
extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_shmop.dll
Please restart your server application (IIS, Apache e.t.c.) after any changes to your php.ini file.
在对 php.ini 文件进行任何更改后,请重新启动您的服务器应用程序(IIS、Apache 等)。
回答by Nikunj Kabariya
Please add below line in php.ini file
请在 php.ini 文件中添加以下行
extension=pdo.so
extension=php_pdo.dll
extension=php_pdo_oci.dll
extension=php_pdo_oci8.dll
and restart apache server and check.
并重新启动apache服务器并检查。