cms icon indicating copy to clipboard operation
cms copied to clipboard

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

Open matt9mg opened this issue 2 years ago • 4 comments

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

matt9mg avatar Apr 14 '22 13:04 matt9mg

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.

brandonkelly avatar Apr 15 '22 00:04 brandonkelly

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?

matt9mg avatar Apr 20 '22 07:04 matt9mg

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

brandonkelly avatar Apr 21 '22 04:04 brandonkelly

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

matt9mg avatar Apr 21 '22 08:04 matt9mg