• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Resolved ext-mongo installation with php7.1

sylver

New Pleskian
Hello,

I have a problem with mongo extension. Can not detect extension ext-mongo in php version 7.1

I have used the following commands successfully
$ /opt/plesk/php/7.1/bin/pecl install mongodb
$ /opt/plesk/php/7.1/bin/pecl config-set php_prefix /opt/plesk/php/7.1/bin/

And in my /opt/plesk/php/7.1/etc/php.ini, I added extension = mongodb.so
with $ plesk bin php_handler --reread
$ service apache2 restart

But can not detect the extension for me to use it in my project (Symfony)

Have you ever encountered the problem and how to solve it?
Thank for your help
 
Please try to install mongo php module with using this method - #2
 
Same problem for PHP 7.1
Could you please be more specific with exact problem/error message in this method:

# yum install plesk-php71-devel gcc make
# /opt/plesk/php/7.1/bin/pecl install mongo
# echo "extension=mongo.so" > /opt/plesk/php/7.1/etc/php.d/mongo.ini
# plesk bin php_handler --reread

After that you can see that mongo.so module is loaded:

# /opt/plesk/php/7.1/bin/php -m | grep mongo
mongo
 
Hello,

It's bad idea to add extension=mongo.so into /opt/plesk/php/7.1/etc/php.ini, because each site in Plesk use own php.ini, best way is create a separate file in /opt/plesk/php/7.1/etc/php.d, as @IgorG recommends

If you still want to add extension into /opt/plesk/php/7.1/etc/php.ini - you need update all sites php.ini via plesk bin php_settings -u
 
I have followed this commands :
$ apt-get install plesk-php71-dev build-essential
$ /opt/plesk/php/7.1/bin/pecl config-set php_prefix /opt/plesk/php/7.1/bin/
$ /opt/plesk/php/7.1/bin/pecl install mongodb
$ echo "extension=mongodb.so" > /opt/plesk/php/7.1/etc/php.d/mongodb.ini
$ /usr/local/psa/bin/php_handler --reread

With phpinfo, mongodb is not appear in the list.
I want use mongodb driver with symfony project but :
doctrine/mongodb 1.6.0 requires ext-mongo ^1.6.7 -> the requested PHP extension mongo is missing from your system with $
/opt/plesk/php/7.1/bin/php composer.phar update
 
Back
Top