问题
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