IAMEM Hosting

Install MongoDB PHP Extension on CentOS Server

Home > Blog > Hosting > Install MongoDB PHP Extension on CentOS Server
11Apr, 2016
0

Install MongoDB PHP Extension on CentOS Server

 

To install PHP MongoDB Extension for PHP to communicate with the MongoDB Server

 

1. Make sure you have PHP PECL, if you do not have it installed, install it using

yum install php-pecl php-dev -y

2. Now, install PHP MongoDB extension using the following command

pecl install mongodb

 

3. Once the installation is complete add the following line to your PHP.ini file

extension=mongodb.so

 

4. Now, for the changes to take effect restart the apache web server using the below command

service httpd restart

 

5. You can verify whether the extension is loaded or not by running the below command

php -m | grep -i mongodb

 

Leave a Reply

eleven + five =

Copyright © 2019 | iamemhost.com . All rights reserved.