How to Install PHP 5 MongoDB Extension Mac Mavericks 10.9 OS X Step-by-Step Easy Guide

April 17, 2014 | By Mark Goo | Filed in: Tutorial.

Enabling PHP MongoDB Support for macOS

The Tutorial Simply shows you Step-by-Step How to Install the PHP 5 MongoDB Database Extension by PECL on Mac 10.9 Mavericks OS X.

MongoDB (from “humongous”) is an Open-Source Document Database written in C++, and the leading NoSQL database.

PECL is short for “PHP Extension Community Library“. PECL Extensions are also distributed as packages and can be installed using the PEAR installer with the PECL command.

Installing MongoDb PHP Pecl Extension for macOS - Featured
  1. Open Terminal Window
    (Press “Enter” to Execute Commands)

    Installing MongoDb PHP Pecl Extension for macOS - Open Terminal
  2. Installing Required autoconf Package by MacPorts

    sudo su

    If Got “User is Not in Sudoers file” then see: How to Enable sudo

    port install autoconf

    How to Install MacPorts on Mac 10.9 Mavericks

    Getting-Started with MacPorts
  3. How to Install/Enable Pear/Pecl Command on Mac OS X

    PHP PEAR+PECL for macOS
  4. Installing PHP 5 MongoDB Extension

    pecl install mongo
  5. Enabling PHP 5 MongoDB Extension

    nano /[path/2]/php.ini

    On the Extensions Section Add:

    Ctrl+x to Save & Exit!

  6. Restart Apache to Load the PHP MongoDB Support.

Tags: , , , , , , , , , , , , , ,

QuickChic Theme • Powered by WordPress