Reputation:
I'm using a Windows 8 64-bit machine and a 32-bit version of WAMPServer
I echoed phpinfo() and the extension has not been loaded - it does not appear
Does anyone know how to fix this?
Upvotes: 0
Views: 3359
Reputation: 718
Looks like it can't load the Mongo Module.
First You have to download the stable dll zip file. PHP-MONGO
Download the Threaded-version of the module. Copy the dll file and paste it in C:\wamp64\bin\php\php5.6.19\ext (if wamp). then go to your php.ini file and paste the following script: extension=php_mongo.dll
in the extensions row.
Note: There shouldn't be a ';' before the extension . Then restart WAMP. In the wamp-php-extension menu you could find the php_mongo. tick mark it. Restart Wamp.
Start mongo and the try executing the following script.
<?php
if($connection = new mongoClient()){
echo "Connected Successfully";
}
?>`
Note: First start the Mongo server.
For more info: PHP/Mongo Manual
If you have problem in start Mongo then Write the command as follows in your Mongo/bin directory:
mongod --storageEngine=mmapv1 --dbpath [your-path]
your-path= The path you want to save the Databse files. (ex: F:\data\db )
The Mongo sever would be running now. Don't close the cmd.
Upvotes: 0
Reputation: 779
Had the same issue. Below steps solved my issue.
Upvotes: 1
Reputation:
I can't add this as a comments because of low reputation.
Did u restart your server after updating ur php.ini file.
Upvotes: 4