• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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