I'm trying to load this module: php_mcrypt.dll' Everything in the php.ini file is correct, see for yourself:
extension_dir = "C:/PHP/5.2.13/ext"
extension=php_mcrypt.dll
The file exists in this path. And other modules are in there as well and are loaded successfully. It only has a problem with this particular module.
I have a 64bit Windows XP, Apache 2.2, PHP 5.2.13...
But i get this warning (error.log of Apache): PHP Warning: PHP Startup: Unable to load dynamic library 'C:/PHP/5.2.13/ext\php_mcrypt1.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP itself is working fine. But one of our applications needs this module and it throws me this ugly error. Why on earth does it show me two 开发者_运维知识库backslashes in the log file?
'C:/PHP/5.2.13/ext\php_mcrypt1.dll'
I'd say there's some typo on your php.ini
(the extra 1
). Perhaps you're loading a different php.ini
from what you expect (see the output of php.ini
to make sure).
Other than that make sure that php_mcrypt.dll
and PHP:
- Were linked to the same VC runtime library (typically msvcrt.dll for VC6 or msvcrt90.dll for VC9) – use e.g. the dependency walker for this
- Are both debug builds or both release builds
- Both have ZTS enabled or ZTS disabled
- For libraries that depend on further libraries (DLLs), make sure they are available (e.g. in the same directory as the extension)
PHP should give you meaning errors if any of the first three conditions above is not satisfied, but I wrote those anyway because I'm not sure for PHP 5.2.
Guys, I found the solution!
Thank god for this article! http://blogs.iis.net/donraman/archive/2009/10/16/configuring-php-extension-on-windows-a-simple-way.aspx
There has been too many problem reported in our forum about not able to configure one particular extension. The problems are many:
* Configuring a non-compatible version of the extension
* Missing some dependent DLL
* Trying to use thread safe version of the extension DLL for non thread safe PHP build and vice-versa
So, I basically installed PHP in a different directory using the PHP MSI installer, which can be found here: http://windows.php.net/download/. I only installed PHP, without the Apache Server, and selected the mcrypt extension. After the installation was done, I copied the dll file into my real PHP directory, restarted Apache and it worked!
im not sure there is 64bit version of libmcrypt.dll available to download out there the problem unable to load the php_mcrypt.dll extension based on dependency of libmcrypt.dll
- download libmcrypt.dll from following link http://files.edin.dk/php/win32/mcrypt/
- copy and paste it into apache/bin/ eg:(C:\Program Files\Apache\bin)
- uncomment extension=php_mcrypt.dll and extension=php_mcrypt_filter.dll
- restart your apache web server using (C:\Program Files\Apache\bin\ApacheMonitor.exe)
for 32 bit windows computer with apache web server installed will work at least it works well on my windows 2003 server with Apache/2.2.8 (Win32) PHP/5.2.6
good for drupal6,wordpress,magento and a lot of cms using php :)
Go back to php.ini and change
extension_dir = "c:/php/ext"
to
extension_dir = "C:\php\ext\"
Then restart the server and try her again.
精彩评论