Conclusion / Learn

Connecting to MongoDB in PHP

In this unit, you learned how to:

  • Install the PHP extension by using PECL
  • Add the MongoDB PHP library to your application by using Composer
  • Troubleshoot common connection errors by checking cluster settings and connection strings

Resources

Use the following resources to learn more about installing and connecting to MongoDB by using PHP:

Lesson 1: Using the MongoDB PHP Driver

Lesson 2: Installing the MongoDB PHP Driver

Lesson 3: Connecting to an Atlas Cluster in PHP Applications

Lesson 4: Troubleshooting a MongoDB Connection in PHP Applications