2009-11-27 125 views
7

这成为一个非常令人沮丧的问题。我正在尝试干净安装apache 2.2和PHP 5.2.11。一切似乎是正确配置,但PHP模块没有开始......PHP启动:无法加载动态库,Windows,Apache 2.2,PHP 5.2.11

PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_mcrypt.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_openssl.dll' - The specified module could not be found.\r\n in Unknown on line 0

在php.ini

include_path = ".;C:\Program Files (x86)\Apache Software Foundation\Apache2.2\php" 
extension_dir = ".;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/" 

的所有文件都没有......的.dll文件,如ssleay32.dll,libmcrypt.dll,libmysql.dll的,的libeay32.dll都安装在...

C:/ Program Files文件(86)/ Apache软件基金会/ APACHE2.2/PHP/

我还包括他们在C:\ Windows \ System32

甚至在Windows路径中添加了C:/ Program Files(x86)/ Apache Software Foundation/Apache2.2/php /。

我不知道为什么这不起作用,它感觉像一个没有胜利的情况。任何人有任何想法如何让这一切工作正常?

回答

10

试试这个:

extension_dir = "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/" 

不与.;

+0

这一切都再次工作。现在我只需要弄清楚为什么OpenSSL和paypalewp在干净安装后仍然无法正常工作......感谢您的答复 – 2009-11-27 12:29:40

+0

乐意提供帮助! 如果您不能解决问题,请发布有关您的OpenSSL问题的其他问题。也许周围的人可以帮忙。 :) – 2009-11-27 12:31:23

+0

非常感谢你,它就像一个魅力! – 2015-04-13 10:45:38

1

开始只是为了我的未来的自己,如果没有别的。这是PHP 5.2.13在Windows上运行IIS 8

我得到了以下错误:

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_openssl.dll' - The specified module could not be found.

phpinfo()加载的php.ini文件是C:\Program Files (x86)\PHP\php.ini

扩展目录:

extension_dir ="C:\Program Files (x86)\PHP\ext" 

这些是php.ini文件的最后两行:

[PHP_SQLSRV] 
extension=php_sqlsrv_52_nts_vc6.dll 
[PHP_OPENSSL] 
extension=php_openssl.dll 

php_openssl.dllphp_sqlsrv_52_nts_vc6.dll文件在ext目录。 php_openssl.dll未损坏(与另一台正在工作的机器上的文件大小相同)。

PHP将找到sqlsrv dll,但不是openssl dll。不知道为什么。没有任何数量的IIS重新启动。

解决方案,直到我知道更好的是,使用Windows PHP安装程序安装openssl.dll扩展。您可以重新运行安装程序并选择“更改”,并允许您添加或删除库。我现在看不到文件或php.ini文件有任何区别,但现在文件加载。

我居然怀疑我的问题是与此类似comment about OpenSSL installation on Windows

At this point, when you start Apache it will attempt to load php_openssl.dll, but if your setup is anything like mine you will see an error. I prefer to start Apache manually, and the error appears in a dialog box: "The ordinal 4114 could not be located in the dynamic link library LIBEAY32.dll". (I'm not sure whether you would get this message if you started Apache as a service). The Apache log also contains an error message saying that php_openssl.dll cannot be loaded, though that message doesn't name libeay32.dll. Welcome to DLL Hell.

Libeay32.dll enters the picture because php_openssl.dll depends on it (and also on ssleay32.dll). What I think happens is that Apache first tries to load php_openssl.dll programmatically from the path specified by the extension_dir key. But then, the loading of the so-called dependent DLLs is left to Windows' default mechanism. If Windows finds an incompatible version of a dependent DLL, you get the error.

我注意到了有关ssleay32.dll错误试图运行命令行php -i时。我只是假设它没有在环境中。IIS没有提及其日志中的任何ssleay32.dll错误。

+0

是的!有效。我从cmd运行Apache,使用从任务管理器,命令行列中复制的x:\ xampp \ apache \ bin \ httpd.exe -d x:/ xampp/apache命令)。它为这两个DLL抛出错误。我不得不将'ssleay32.dll'和'libeay32.dll'从php dir复制到apache \ bin。谢谢! – 2017-11-21 00:52:04

1

你只是取消注释的extension_dir在php.ini

enter image description here

0

当初同样的错误,但不是照搬加入PHP文件夹到系统路径文件,并重申了服务器。

相关问题