Add PDO $options support

Created on 12 October 2020, about 4 years ago
Updated 25 May 2023, over 1 year ago

Problem/Motivation

Db services may require additional settings to be sent to the connection string via the PDO $options parameter. See PDO::__construct.

For example, Azure DB for MySQL/MariaDB requires a cert to be attached to the PDO connection.

Steps to reproduce

  • Add a new Aegir server to an Azure DB for MySQL server (with the default "Enforce SSL connection" setting)
  • Observe the verify task fails with SQLSTATE[HY000] [9002] SSL connection is required. Please specify SSL options and retry.

Proposed resolution

I'd recommend a solution similar to the one that was implemented in SimpleSAMLphp. We'll need to add an options field in the UI then hook it up in Provision/Service/db/pdo.php.

Remaining tasks

  • Add a (multivalued?) options field in the server definition.
  • Write the options out to the PDO connection.

(I'm sure there's more)

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

3.0

Component

DB Service

Created by

πŸ‡ΊπŸ‡ΈUnited States froboy Chicago, IL

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024