【问题标题】:WAMP PHP Startup Error: Unable to load dynamic libraryWAMP PHP 启动错误:无法加载动态库
【发布时间】:2014-11-29 14:47:49
【问题描述】:

我的 WAMP 服务器昨天工作得非常好。今天我不得不重新启动我的电脑,有些东西弄乱了工作。服务器永远不会完全启动...任务栏图标保持橙色。我的项目将打开,但只有 HTML 加载而不是 PHP。这是我的 PHP 错误日志...

[04-Oct-2014 01:36:27 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:36:27 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:36:27 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_smtp.dll' - %1 is not a valid Win32 application.

 in Unknown on line 0

[04-Oct-2014 01:36:27 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:36:27 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:36:27 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_smtp.dll' - %1 is not a valid Win32 application.

 in Unknown on line 0

[04-Oct-2014 01:37:28 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:37:28 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:37:28 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_smtp.dll' - %1 is not a valid Win32 application.

 in Unknown on line 0

[04-Oct-2014 01:37:29 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:37:29 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:37:29 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_smtp.dll' - %1 is not a valid Win32 application.

 in Unknown on line 0

[04-Oct-2014 01:38:42 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:38:42 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:38:42 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_smtp.dll' - %1 is not a valid Win32 application.

 in Unknown on line 0

[04-Oct-2014 01:38:43 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:38:43 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:38:43 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_smtp.dll' - %1 is not a valid Win32 application.

 in Unknown on line 0

[04-Oct-2014 01:44:47 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:44:47 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:44:47 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_smtp.dll' - %1 is not a valid Win32 application.

 in Unknown on line 0

[04-Oct-2014 01:44:48 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:44:48 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

 in Unknown on line 0

[04-Oct-2014 01:44:48 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'W:/wamp/bin/php/php5.5.12/ext/php_smtp.dll' - %1 is not a valid Win32 application.

 in Unknown on line 0

所有库的文件仍然存在于正确的文件夹中。有谁知道是什么原因造成的?

更新:不知道为什么我有这么多不同的版本,但它们是:

更新:我完全重新安装了 wamp,但仍然出现这些错误。

【问题讨论】:

  • %1 is not a valid Win32 application. 你确定那些是 32 位库吗?或者您没有安装正确版本的 Visual C++ Redistributable。使用dependencywalker.com检查依赖关系
  • 我已更新我的问题以包含已安装版本的屏幕截图。
  • 通过链接运行程序 - 它会显示需要或缺少哪些额外的 dll。 + stackoverflow.com/questions/25138611/… + forum.wampserver.com/read.php?2,112211
  • 这个问题似乎跑题了,因为它不涉及编程。请在 superuser.com 上询问

标签: php wamp


【解决方案1】:

这是版本不匹配或这些扩展 dll 缺少依赖项。

您可能需要安装 Visual C++ Redistributable:

PHP VC9 版本 (5.4) 要求您安装 Visual C++ Redistributable for Visual Studio 2008 SP1 x86 或 x64。

VC11 版本(5.5、5.6)需要安装 Visual C++ Redistributable for Visual Studio 2012 x86 或 x64。

php_ldap 可能也需要 libeay32.dll 和 ssleay32.dll……但这些文件是 PHP 发行版的一部分。这只是一个问题,如果它们被删除或者 PHP 文件夹不在您的 ENV PATH 变量中。

尝试下载新的 PHP:

【讨论】:

  • 所以我下载了 PHP 文件,将它们复制到正确的文件夹并尝试重新启动服务器,但仍然没有任何变化。
  • 您是否将 PHP 文件夹附加到系统 PATH var 中?
  • 在使用 WAMPServer 时,切勿将任何 Apache/PHP/MYSQL 文件夹放在 Windows PATH 中。
  • 为什么?将二进制文件的 PATH 添加到 Windows 路径是一种常见的做法。 WampServer 在这里有什么不同?
  • 啊,之前有同样的问题并找到了你的答案:stackoverflow.com/a/26199341/1163786 抱歉,这么说但是 WampServer 方法是非标准的 - 即使使用 PHP 版本切换器,你也会附加 PATH var.. .
【解决方案2】:

这可以通过使用Wamp 菜单来纠正。

检查您拥有的 apache 版本。它可能是 2.4.9

这将导致WAMPServer to rebuild of all the SYMLINK's in the apache2.4.9/bin folder and that will put the correct symlinks in there for these 2 extensions.here 所说。

因此您需要编辑 \wamp\script\config.inc.php 并找到变量 $phpDllToCopy 并进行如下更改

$phpDllToCopy = array (
'icudt52.dll', 
'icuin52.dll',
'icuio52.dll',
'icule52.dll',
'iculx52.dll',
'icutest52.dll',
'icutu52.dll',
'icuuc52.dll',
'icudt51.dll', 
'icuin51.dll',
'icuio51.dll',
'icule51.dll',
'iculx51.dll',
'icutest51.dll',
'icutu51.dll',
'icuuc51.dll',
'icudt50.dll', 
'icuin50.dll',
'icuio50.dll',
'icule50.dll',
'iculx50.dll',
'icutest50.dll',
'icutu50.dll',
'icuuc50.dll',
'icudt49.dll',
'icuin49.dll',
'icuio49.dll',
'icule49.dll',
'iculx49.dll',
'icutest49.dll',
'icutu49.dll',
'icuuc49.dll',
'libeay32.dll',
'libsasl.dll', 
'libintl.dll',
'php5isapi.dll',
'php5nsapi.dll',
'ssleay32.dll',
'php5ts.dll',
'fribidi.dll', 
'fdftk.dll',   
'libmcrypt.dll',
'libmhash.dll',
'libmysql.dll',
'libmysqli.dll',
'msql.dll',
'ntwdblib.dll',
'php5activescript.dll',
);

【讨论】:

  • 但是为什么需要符号链接或复制这些依赖项?如果未找到依赖项,则更有可能是 PATH 问题。要么未附加 PATH,因此未找到 DLL,要么未满足 PATHS 的查找顺序,导致 DLL 和依赖项版本不匹配。无论如何,服务器堆栈应该为用户处理这个问题,而不是强迫他进行棘手的配置工作。我的观点是,它应该开箱即用,不需要用户交互,只是为了让 PHP 运行..
  • @JensA.Koch 使用 WAMPServer,PATH 不会因任何原因而修改,因为可以通过单击菜单来激活和停用多个 PHP 版本。如果使用 PATH,这将使这个功能更加复杂,因为运行 Apache/PHP 或 MYSQL 的 PATH 引用是完全没有必要的,WAMPserver 不会这样做。
【解决方案3】:

这只是 2.5 安装过程中的一个小插曲。

你需要做的就是:-

使用 wampmanager(系统托盘中的 W 图标)做

left click wampmanager -> Apache -> Version -> (and click on the version number)

这将导致 wampmanager 重建 apache/bin 文件夹中的所有 SYMLINKS,并重新启动 Apache。这应该可以解决问题并阻止错误出现在 php error log 中。

【讨论】:

  • 除此之外,如果您安装了新的 .DLL(addon) 并出现此错误并且无法解决此问题,请确保满足已安装的 .DLL 要求。 (在我的情况下是操作系统)
【解决方案4】:

请卸载你已经安装的 wamp.. 尝试安装 Visual C++ 即这里给出的链接http://www.microsoft.com/en-in/download/confirmation.aspx?id=30679使用这个链接。

下载并安装 Visual C++ 后,您可以再次安装 Wamp 服务器。这样它就可以正常工作了...

【讨论】:

  • 完全不需要安装 Visual Studio,只需要 Visual C/C++ 运行时库,而不是完整的 VS。
【解决方案5】:

已解决!!

我收到以下错误:

1) PHP 启动:无法加载动态库 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - 找不到指定的模块。

2) 程序无法启动,因为您的计算机中缺少 MSVCP110.dll。尝试重新安装程序以解决此问题。

即使在安装 Visual C++ Redistributable 之后,错误仍然存​​在。 我通过将 MSVCP110.dll 复制到 Windows\System32 文件夹来解决它。现已启动并运行!

【讨论】:

  • 这不是解决方案! MSVCP... dll 不应手动复制。它们应该正确安装
【解决方案6】:

在wamp(7.3.17)添加新的PHP版本后发生在我身上,添加路径 wamp\bin\php\Path_of_your_PHP 在环境变量PATH中解决了这个问题。

【讨论】:

    猜你喜欢
    • 2020-10-12
    • 2019-07-30
    • 2019-04-03
    • 2015-03-01
    • 2023-01-16
    • 2016-04-15
    • 2021-04-03
    • 2020-03-16
    • 2016-11-27
    相关资源
    最近更新 更多