Skip to content

Mention OS specific SSL configuration #3

@netbrothers-tr

Description

@netbrothers-tr

For me, the instructions given in the readme file didn't work right away. I chose to install the project on an Ubuntu system and to connect to the database with username and password. Pretty standard choices they seemed to me. The problem was, that the preconfigured path value for the option PDO::MYSQL_ATTR_SSL_CA in the file config/packages/doctrine.yaml didn't match with my OS's certificates file. It had to be changed as follows.

# config/packages/doctrine.yaml
-          !php/const:PDO::MYSQL_ATTR_SSL_CA: /etc/ssl/cert.pem  # if connecting with client certs, remove this
+          !php/const:PDO::MYSQL_ATTR_SSL_CA: /etc/ssl/certs/ca-certificates.crt # works on Ubuntu

After the change, it worked flawlessly.

To solve this universally, I'd suggest to either

  • simply mention in the readme file that the configuration in config/packages/doctrine.yaml might need platform specific adjustments

or to

  • control this with an environment variable providing some hints in the .env file for different OS's.

I'd be willing to write a patch, once I have some feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions