Hi Patrick,
I tried updating this but unfortunately, I received the same error on connecting. To test my credentials I tried connecting manually outside of Wappler and that did work as long as I pointed to the local .pem file.
$host = ‘host’;
$db = ‘database’;
$user = ‘user’;
$pass = ‘password’;
$charset = ‘utf8’;
$options = [
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
\PDO::MYSQL_ATTR_SSL_CA => ‘/Users/brian/rds-combined-ca-bundle.pem’,
\PDO::ATTR_EMULATE_PREPARES => false,
];
$dsn = “mysql:host=$host;dbname=$db;charset=$charset”;
try {
$pdo = new PDO($dsn, $user, $pass, $options);
} catch (\PDOException $e) {
throw new \PDOException($e->getMessage(), (int)$e->getCode());
}
$stmt = $pdo->query(“SELECT * FROM table LIMIT 1”);
$user = $stmt->fetch();
$results = print_r($user, true);
echo $results;
Trying the same in Wappler wasn’t successful. I wondered if it caches any code so maybe it didn’t see my changes?
On a different note, great to see 2.0 released and the new website looks really nice.
Best regards,
Brian