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 the hint is not found phpize
, you need to add the relevant execution file in Xmapp to the environment variable. or directly specify if XAMPP is installed in the/OPT directory, the directory is phpize
/opt/lampp/bin/phpize
.
Then, you php.ini
can add the appropriate configuration:
extension=mongo.so
You can query the location of php.ini with the following command:
php -i | grep php.ini
Install MongoDB driver for PHP in Xampp under Ubuntu