how to instal mongodb php driver on windows 8 and wamp server?

别说谁变了你拦得住时间么 提交于 2019-12-11 12:03:30

问题


I am trying to instal mongodb driver in php. I am using wamp server with php version 5.5.12. I have tried it alot but don't know what am I doing wrong. Here is what I did:

Step 1: I downloaded the mongodb driver package from this link: http://pecl.php.net/package/mongo/1.5.5/windows I downloaded 5.5 Non Thread Safe (NTS) x64 under PHP 5.5 tab.

Step 2: I unzipped the downloaded file and copied the php_mongo.dll and php_mongo.pdb files into C:\wamp\bin\php\php5.5.12\ext

Step 3: I included this line 'extension=php_mongo.dll' in my php.ini file.

Step 4: I restarted the wamp server.

After doing all this, I am still not able to locate PHP Mongo in localhost/php.info which means the driver has not installed. I badly need some help. please tell me step by step how can I instal mongodb php driver on windows?


回答1:


I solved it..all I did was copied the libsasl.dll file from 'C:\wamp\bin\php\php5.5.12' and paste it into 'C:\wamp\bin\apache\apache2.4.9\bin'.




回答2:


DLL name must be same as you given in php.ini extension=php_mongo.dll the extension you given line must not start with ; it must be like following. extension=php_mongo.dll this(;) is used for comment. C:\wamp\bin\php\php5.x\ext\ I got the same problem and fixed it when I removed ;

if you still face the problem I'll resolve it... just comment...



来源:https://stackoverflow.com/questions/34295351/how-to-instal-mongodb-php-driver-on-windows-8-and-wamp-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!