Let's learn how to load MongoDB extension for WAMP.
It's not hard as I thought, so I would like to share it with you!
Here is steps to follow:
It's not hard as I thought, so I would like to share it with you!
Here is steps to follow:
- First decide with PHP version you are using right now.
- In my case I am using 5.5.xx
- Then visit MongoDB documentation.
- https://docs.mongodb.com/ecosystem/drivers/php/#language-compatibility
- from here you will be able determine which mongo version package you should download
- For instance I am using 5.5.xx so I will go through the mongo-1.6 which is latest and supported to my PHP version.
- Next it's time to download mongo package.
- In my case I will download 1.6 as it's right for me :)
- Once you clicked on DLL link under download section? Next you'll get more package information.
- You will look into DDL list section and choose your right PHP version and right Thread Safe (TS) version for you.
Note : You'll see, there are two architecture x86 and x64. I know what are you going to ask HOW DO I KNOW WHICH ONE I AM USING RIGHT? and answer is, look at your phpinfo() and you'll it from there. - After that you'll download the mongodb package. In package you'll get php_mongodb.dll file, which you have to place under "ext" directory.
- C:\wamp\bin\php\php5.5.12\ext
- Now update your php.ini file, add following line in your php.ini
- extension=php_mongodb.dll
- That's it! fasten your belt and reset your WAMP.
- To check extension is loaded or not check phpinfo() and search mongodb, if you able to find it out, then you get your feet in door :)
Happy Coding!
No comments:
Post a Comment