MongoDB PHP Tutorial - 1 - Driver and PHP Library Set Up
Why Stack Overflow recommends it
Stack Overflow users link it when they need a step-by-step walkthrough for installing the MongoDB driver and PHP library on a XAMPP or WAMP setup, and when they get stuck at one of its steps.
Recommended by 1 people across 1 different months, 2016 to 2018.
What it is
A short beginner tutorial from Codevolution, the first in a series on using MongoDB with PHP. It walks through setting up the environment on Windows: installing MongoDB and XAMPP, adding the PHP MongoDB driver extension, and installing the PHP library with Composer.
What people said
Recommends Jul10 · 2017-10 · Stack Overflow · on “Error and warning connecting MongoDB to PHP using php_mongodb extension”
The problem is certainly related to WAMP and I think is related to the multiple php.ini in his folders. In fact, in the apache folder you can find a php.ini file that cannot be modified, otherwise nothing works at all; at the same time any changes made to the php.ini file in the php folder seems have no effect except making appear the mongodb extension in the extensions list. So, I try using XAMPP, as suggested in this video tutorial [this video] and it works. Using Composer I was able to install also the PHP library and not only the driver.
Cites waqas · 2016-08 · Stack Overflow · on “Warning: require(vendor/autoload.php): failed to open stream: No such file or directory in php with mongoDB :”
I am working on php with MongoDB . On running the below script in wamp server by going to localhost/test.php , it gives the error: Warning: require(vendor/autoload.php): failed to open stream: No such file or directory in C:\wamp64\www\test.php on line 3 The second error is Fatal error: require(): Failed opening required 'vendor/autoload.php' (include_path='.;C:\php\pear') in C:\wamp64\www\test.php on line 3 I also installed composer by composerSetup.exe . Why it is giving the error? <?php require 'vendor/autolod.php'; $client = new Mongo\Client; $companydb = $client->companydb; $result1 = $companydb->createCollection('collection1'); var_dump(result1); ?> while phpinfo() is working fine afte
Cites codex · 2018-01 · Stack Overflow · on “How to install Mongodb driver in PHP”
I followed the steps mentioned here [this video] . I downloaded the latest stable version of it here [LINK] which is 1.3.4. Extracted the php_mongodb.dll and placed it in the ext in my xampp directory. Modified the php.ini and added extension=php_mongodb.dll . Downloaded the composer but just when the composer installer does its work, it gives me the error. I tried the x64 TS (I checked my phpinfo and its thread safe) because my laptop is 64 bit but it gives me an error Program Output: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_mongodb.dll' - %1 is not a valid Win32 application. in Unknown on line 0 Tried the x84 as well (i know it wont work but i tried nonthel
Cites Jean Col · 2018-03 · Stack Overflow · on “Can't download php_mongodb.dll from pecl website”
I'm trying to install the php mongodb driver. I've set up my php.ini file and now, I want to download the php_mongodb.dll so that I can put it inside php/ext/. However, I cannot find the link where I can download the DLL of the php mongodb driver. It's driving me crazy because all the tutorials I've seen casually say : "Now, go to [LINK] and download the DLL". However, I cant see where is the link... What I see on my screen : [LINK] Also, I found a youtube video where I can clearly see the button to download the DLL, but on my side, there is NOTHING. ( [this video] ) [LINK] Where can I download the DLL if its no longer available on PECL website ? EDIT : The DLL icon is back on the PECL website :