Cannot find certificate

Hi trying to connect to a replica set, and encountered a No suitable server found, when I checked in the logs found this error:


but, when I try to run the script via command line using the same certificates and connection string, was successful, however failed when trying to access via web, HTTP only.

Here is my connection string.

$connection = new MongoDB\Client("mongodb://${username}:${password}@server1:61972,server2:61972,server3:61972/?replicaSet=mongogsavers0&authSource=stg_db", array("tls" => true, "tlsCAFile" => '/path/certificate/mongosertificate.crt', "tlsCertificateKeyFile" => '/path/certificate/pemfile.pem'));

PHP version: 7.2
MongoDB: 4.2
Library version: 1.9

Thank you in advance.