skip to Main Content

Im using plesk 12 and PHP7 on centos 7.
How can i enable libmongoc ssl on my server?

enter image description here

2

Answers


  1. Try to compile it with

    yum install git plesk-php70-devel make gcc openssl-devel

    git clone https://github.com/mongodb/mongo-php-driver.git

    cd mongo-php-driver/

    git submodule update –init

    /opt/plesk/php/7.0/bin/phpize

    ./configure –with-php-config=/opt/plesk/php/7.0/bin/php-config –with-mongodb-ssl=openssl

    make

    cp /root/mongo-php-driver/modules/mongodb.so /opt/plesk/php/7.0/lib/php/modules/

    plesk bin php_handler –reread

    After that in phpinfo() you will see:

    libmongoc SSL enabled

    libmongoc SSL library OpenSSL

    libmongoc crypto enabled

    libmongoc crypto library libcrypto

    Login or Signup to reply.
  2. I was able to get this working in php-fpm (7.1) Docker using below commands. What’s important is to install libssl-dev before installing mongodb driver.

    apt-get install -y autoconf pkg-config libssl-dev
    pecl install mongodb
    echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/mongodb.ini

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search