简体   繁体   English

Apache:无法加载动态库

[英]Apache: Unable to load dynamic library

Apache 2.4.4 is not loading two modules. Apache 2.4.4 未加载两个模块。 The modules exist in the directory where it is looking.模块存在于它正在查找的目录中。

I'm using Windows 8.1, PHP 5.4.12, and a WAMPServer installation.我使用的是 Windows 8.1、PHP 5.4.12 和 WAMPServer 安装。

[Thu Oct 20 19:12:33.092619 2016] [mpm_winnt:notice] [pid 6888:tid 548] AH00418: Parent: Created child process 3172 [2016 年 10 月 20 日星期四 19:12:33.092619] [mpm_winnt:notice] [pid 6888:tid 548] AH00418:父进程:创建子进程 3172

PHP Warning: PHP Startup: Unable to load dynamic library 'm:/wamp/bin/php/php5.4.12/ext/php_pdo_pgsql.dll' - The specified module could not be found.\\r\\n in Unknown on line 0 PHP 警告:PHP 启动:无法加载动态库 'm:/wamp/bin/php/php5.4.12/ext/php_pdo_pgsql.dll' - 找不到指定的模块。\\r\\n 在第 0 行的未知中

PHP Warning: PHP Startup: Unable to load dynamic library 'm:/wamp/bin/php/php5.4.12/ext/php_pgsql.dll' - The specified module could not be found.\\r\\n in Unknown on line 0 PHP 警告:PHP 启动:无法加载动态库 'm:/wamp/bin/php/php5.4.12/ext/php_pgsql.dll' - 找不到指定的模块。\\r\\n 在第 0 行的未知中

[Thu Oct 20 19:12:33.319122 2016] [mpm_winnt:notice] [pid 3172:tid 448] AH00354: Child: Starting 150 worker threads. [2016 年 10 月 20 日星期四 19:12:33.319122] [mpm_winnt:notice] [pid 3172:tid 448] AH00354:子:启动 150 个工作线程。

My PHP, Apache, and PostgreSQL are all 64 bit.我的 PHP、Apache 和 PostgreSQL 都是 64 位的。

I added the directory (m:\\PostgreSQL\\9.3\\lib) that includes libpq.dll to my Path and then restarted but it didn't help.我将包含 libpq.dll 的目录 (m:\\PostgreSQL\\9.3\\lib) 添加到我的路径中,然后重新启动,但没有帮助。

I also tried copying libpq.dll into the Apache bin directory.我还尝试将 libpq.dll 复制到 Apache bin 目录中。

Are there any other dependencies?还有其他依赖吗?

我通过将 PostgreSQL bin 目录添加到路径(环境变量)来修复它。

for my case PHP 7.2.26 , it was under:对于我的情况 PHP 7.2.26 ,它位于:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

on php.ini such that ;extension=pgsql becomes:在 php.ini 上, ;extension=pgsql 变成:

extension=pgsql

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM