craftcms/craft

How fix this

Opened this issue · 2 comments

After open some in admin area

Invalid Configuration – yii\base\InvalidConfigException
Unsupported DB driver value:

That means that this setting is not getting set properly:

'driver' => getenv('DB_DRIVER'),

By default it should be getting set from a DB_DRIVER environment variable, which the default project sets via the .env file:

craft/.env.example

Lines 7 to 8 in a2a9f2f

# The database driver that will be used ('mysql' or 'pgsql')
DB_DRIVER="mysql"

Make sure that you actually have a .env file, and that it is defining the DB_DRIVER variable correctly. (If you are on a Mac, you can get Finder to show hidden files like .env by pressing Command Shift ..) If the file doesn’t exist, duplicate the .env.example file as .env.

Thanks for answer Craft is really amazing