PHP + Mongo: Cannot create SSL client

Asked

Viewed 175 times

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 'Cannot create SSL client. SSL is not enabled in this build.'

From what I understand SRV uses SSL. That’s it?

1 answer

0

In php.ini I noticed that SSL was disabled

libmongoc SSL   disabled

To enable you need to install packages before installing mongodb

yum install openssl-devel pkgconfig

Browser other questions tagged

You are not signed in. Login or sign up in order to post.