PHP + Mongo: Can not create SSL client

0

How do I connect to a Mongo + SRV DB?

$manager = new MongoDB\Driver\Manager('mongodb+srv://username:[email protected]');

Error:

  

Fatal error: Uncaught exception 'MongoDB \ Driver \ Exception \ InvalidArgumentException' with message   'Can not create SSL client. SSL is not enabled in this build. '

So I understand SRV uses SSL. Is that it?

    
asked by anonymous 19.07.2018 / 03:21

1 answer

0

In php.ini I noticed that SSL was disabled

libmongoc SSL   disabled

To enable you must install the packages before installing mongodb

yum install openssl-devel pkgconfig
    
16.08.2018 / 16:27