craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.27k stars 635 forks source link

[3.x]: Must install mysql libs when using postgresql #10919

Open matt9mg opened 2 years ago

matt9mg commented 2 years ago

What happened?

Description

Web installer scripts does not indentify postgres install and prompts for mysql to be installed. https://craftcms.com/docs/3.x/installation.html#step-4-create-a-database

Steps to reproduce

  1. Run a server with just php8.1-pgsql and a postgres server installation
  2. try to run the web installer
  3. says must install mysql libs

Expected behavior

  1. the installer screen detects we have psql installed and allow us to continue

Actual behavior

Screenshot 2022-04-14 at 13 07 11

Craft CMS version

3

PHP version

8.1

Operating system and version

ubuntu 20.04 LTS

Database type and version

postgres

Image driver and version

No response

Installed plugins and versions

-

brandonkelly commented 2 years ago

Is your driver DB setting in config/db.php set to mysql? (It should be pgsql if you’re using Postgres.)

If it’s set to App::env('DB_DRIVER') (as it is by default), check the DB_DRIVER environment variable in your .env file.

matt9mg commented 2 years ago

Hi @brandonkelly it was set too mysql as the install seemed to copy the .example.env file, I then followed the instructions and tried to load the screen and the error message was displayed. I tried changing this to pgsql as you mentioned but I was still presented with the same error.

I feel like there is a missing step?

brandonkelly commented 2 years ago

Are you able to run php craft setup/db-creds and have that complete successfully?

matt9mg commented 2 years ago

I haven't tried that to be honest I'll come back to you.