Install MongoDB driver for PHP in Xampp under Ubuntu

Source: Internet
Author: User
Tags install mongodb mongodb driver
The XAMPP referred to here are: XAMPP

The specific configuration environment:

Kubuntu 14.04LTS 64bit Lampp 1.8.3-4

First, get the latest source of MongoDB PHP driver from GitHub: Https://github.com/mongodb/mongo-php-driver

Before you follow the prompts, install the following dependencies:

sudo apt-get Install install M4

sudo apt-get install autoconf

sudo apt-get install Libssl-dev

Then, follow the project documentation:

Phpize

./configure

Make

sudo make install

Note that if you are prompted not to find phpize, you need to add the relevant execution file in Xmapp to the environment variable. or directly, if XAMPP is installed in the/OPT directory, the Phpize directory is/opt/lampp/bin/phpize.

Then, add the appropriate configuration to the php.ini:
Extension=mongo.so

You can query the location of php.ini with the following command:
Php-i | grep php.ini

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.