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