PHP启动无法加载动态库php_mongo.dll [英] PHP Startup Unable to load dynamic library php_mongo.dll

查看:784
本文介绍了PHP启动无法加载动态库php_mongo.dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是初学者。我正在尝试在php上安装mongodb驱动程序。

 平台:Windows 8.1 64bit。 
PHP 5.5.9
Apache / 2.4.7

遵循这里的说明: http://php.net/manual/en/mongo.installation.php#mongo .installation.windows



我已经尝试所有php_mongo.dll文件与VC11并放入php / ext文件夹。并在php.ini文件中添加了 extension = php_mongo.dll ,但是当我尝试在xampp控制器中启动apache时发生错误。

  Php启动:无法加载动态库
'C:\xampp\php\ext\php_mongo.dll' - %1不是有效的Win32应用程序。

我已经在phpinfo()中检查了我的VC编译器版本,并且在 MSVC11 架构:x86



如果有人可以帮助我,这会很好。
谢谢。欣赏它。

解决方案

请确保为您的php安装下载正确的.DLL。很好,你运行apache x86,所以下载一个x86 php_mongo.dll。另外,如果您运行PHP作为Apache模块,请确保选择线程安全(ts)一个。还要选择这种类型的与您正在运行的php版本相匹配的dll。版本必须匹配,否则您将收到一个php启动错误。找到这些Mongo DLL的这里。我这样做,然后我得到一个错误libsasl.dll没有找到。我简单地将我的php安装目录中找到的libsasl.dll复制到apache安装目录(找到httpd.exe)。然后我重新启动了我的apache。它工作!


I'm a beginner for this. I'm trying to install mongodb driver on php.

Platform: Windows 8.1 64bit.
PHP 5.5.9
Apache/2.4.7

Followed the instruction here:http://php.net/manual/en/mongo.installation.php#mongo.installation.windows

I've tried all php_mongo.dll file with VC11 and put in php/ext folder. and added extension=php_mongo.dll in php.ini file but when I tried to start apache in xampp controller I got an error.

    Php Startup: Unable to load dynamic library
  'C:\xampp\php\ext\php_mongo.dll' -%1 is not a valid Win32 application.

I've already check my VC compilator version inside phpinfo() and it's stated there MSVC11 with architecture: x86.

it would be nice if someone can help me. Thanks. appreciate it.

解决方案

Make sure you download the correct .DLL for your php installation. Good chance you're running apache x86, so download an x86 php_mongo.dll. Also if you're running PHP as an Apache module, make sure you pick the thread safe (ts) one. Also pick this type of dll that matches the php version you're running. The versions must match or else you will get a php startup error. Find these Mongo DLLs here. I did this then I got an error libsasl.dll not found. I simply copied the libsasl.dll found in my php installation directory to the apache installation directory (where httpd.exe is found). Then I restarted my apache. And it worked!

这篇关于PHP启动无法加载动态库php_mongo.dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆