Answers.Body: <p>Found the problem. I had to remove putenv from the disabled functions in php.ini</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-05T17:21:03.147Z
Answers.LastActivityDate: 2019-05-05T17:21:03.147Z
Answers.UserDisplayName: Jim
Answers.Body: <p>In my case I was missing the .env file in my Atomic SFTP deploy. ‍♂️</p>
  
  <p>So the DB_DRIVER setting was not there...</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-30T13:21:05.690Z
Answers.LastActivityDate: 2019-08-30T13:21:05.690Z
Answers.UserDisplayName: Merc
Body: <p>I'm using WinNMP for my local dev environment. I installed and configured everything successfully last week, and everything was running well. Unfortunately, I needed to reset my windows installation to clear up some disk I/O issues. After the reset, I rebuilt the dev environment (MySQL, WinNMP, VSCode, etc.) and restored all the project files and settings (nginx server blocks, databases, etc.) Now, my Craft site is giving me an internal server error..."unsupported DB driver", which is set to 'mysql' in .env.</p>
  
  <p>I've verified that my MySQL install is working. I'm able to connect and query successfully with a simple php script using the same credentials. My PHP requirements check shows no concerns. What else may be the issue? i wasn't sure if I need to do any Composer installs or checks after restoring the project files.</p>
  
  <p>Here's the full stack trace...</p>
  
  <pre><code>2019-05-05 15:34:17 [-][-][-][error][craft\base\ApplicationTrait::getIsDbConnectionValid] There was a problem connecting to the database: Unsupported DB driver value: 
  2019-05-05 15:34:17 [-][-][-][error][yii\web\HttpException:503] craft\web\ServiceUnavailableHttpException in C:\WinNMP\WWW\merkhaus\vendor\craftcms\cms\src\web\Application.php:533
  Stack trace:
  #0 C:\WinNMP\WWW\merkhaus\vendor\craftcms\cms\src\web\Application.php(187): craft\web\Application-&gt;_processInstallRequest(Object(craft\web\Request))
  #1 C:\WinNMP\WWW\merkhaus\vendor\yiisoft\yii2\base\Application.php(386): craft\web\Application-&gt;handleRequest(Object(craft\web\Request))
  #2 C:\WinNMP\WWW\merkhaus\web\index.php(21): yii\base\Application-&gt;run()
  #3 {main}
  2019-05-05 15:34:17 [-][-][-][profile begin][craft\web\View::renderTemplate] 503
  2019-05-05 15:34:17 [-][-][-][profile begin][craft\web\twig\Template::display] 503
  2019-05-05 15:34:17 [-][-][-][profile begin][craft\web\twig\Template::display] _layouts/message
  2019-05-05 15:34:17 [-][-][-][profile begin][craft\web\twig\Template::display] _layouts/base
  2019-05-05 15:34:17 [-][-][-][info][application] $_GET = [
      'p' =&gt; 'admin/install'
  ]
  
  $_POST = []
  
  $_FILES = []
  
  $_COOKIE = []
  
  $_SERVER = [
      'ALLUSERSPROFILE' =&gt; 'C:\\ProgramData'
      'APPDATA' =&gt; 'C:\\Users\\jimme\\AppData\\Roaming'
      'CommonProgramFiles' =&gt; 'C:\\Program Files\\Common Files'
      'CommonProgramFiles(x86)' =&gt; 'C:\\Program Files (x86)\\Common Files'
      'CommonProgramW6432' =&gt; 'C:\\Program Files\\Common Files'
      'COMPOSER_CACHE_DIR' =&gt; 'c:\\winnmp\\bin\\composer'
      'COMPOSER_HOME' =&gt; 'c:\\winnmp\\bin\\composer'
      'COMPUTERNAME' =&gt; 'DESKTOP-R7F7LDM'
      'ComSpec' =&gt; 'C:\\WINDOWS\\system32\\cmd.exe'
      'DriverData' =&gt; 'C:\\Windows\\System32\\Drivers\\DriverData'
      'FPS_BROWSER_APP_PROFILE_STRING' =&gt; 'Internet Explorer'
      'FPS_BROWSER_USER_PROFILE_STRING' =&gt; 'Default'
      'HOMEDRIVE' =&gt; 'C:'
      'HOMEPATH' =&gt; '\\Users\\jimme'
      'INTEL_DEV_REDIST' =&gt; 'C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\'
      'LOCALAPPDATA' =&gt; 'C:\\Users\\jimme\\AppData\\Local'
      'LOGONSERVER' =&gt; '\\\\DESKTOP-R7F7LDM'
      'MIC_LD_LIBRARY_PATH' =&gt; 'C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\compiler\\lib\\mic'
      'NUMBER_OF_PROCESSORS' =&gt; '12'
      'OPENSSL_CONF' =&gt; 'c:\\winnmp\\conf\\openssl.conf'
      'OS' =&gt; 'Windows_NT'
      'PATHEXT' =&gt; '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW'
      'PROCESSOR_ARCHITECTURE' =&gt; 'AMD64'
      'PROCESSOR_IDENTIFIER' =&gt; 'Intel64 Family 6 Model 62 Stepping 4, GenuineIntel'
      'PROCESSOR_LEVEL' =&gt; '6'
      'PROCESSOR_REVISION' =&gt; '3e04'
      'ProgramData' =&gt; 'C:\\ProgramData'
      'ProgramFiles' =&gt; 'C:\\Program Files'
      'ProgramFiles(x86)' =&gt; 'C:\\Program Files (x86)'
      'ProgramW6432' =&gt; 'C:\\Program Files'
      'PSModulePath' =&gt; '%ProgramFiles%\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules'
      'PUBLIC' =&gt; 'C:\\Users\\Public'
      'SESSIONNAME' =&gt; 'Console'
      'SystemDrive' =&gt; 'C:'
      'SystemRoot' =&gt; 'C:\\WINDOWS'
      'TEMP' =&gt; 'c:\\winnmp\\tmp'
      'TMP' =&gt; 'c:\\winnmp\\tmp'
      'USERDOMAIN' =&gt; 'DESKTOP-R7F7LDM'
      'USERDOMAIN_ROAMINGPROFILE' =&gt; 'DESKTOP-R7F7LDM'
      'USERNAME' =&gt; 'jimme'
      'USERPROFILE' =&gt; 'C:\\Users\\jimme'
      'windir' =&gt; 'C:\\WINDOWS'
      'WINNMP' =&gt; 'windows'
      'HTTP_ACCEPT_LANGUAGE' =&gt; 'en-US,en;q=0.9'
      'HTTP_ACCEPT_ENCODING' =&gt; 'gzip, deflate'
      'HTTP_ACCEPT' =&gt; 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3'
      'HTTP_USER_AGENT' =&gt; 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36'
      'HTTP_UPGRADE_INSECURE_REQUESTS' =&gt; '1'
      'HTTP_CONNECTION' =&gt; 'keep-alive'
      'HTTP_HOST' =&gt; 'merkhaus.test'
      'REDIS' =&gt; 'localhost'
      'HTTP_MOD_REWRITE' =&gt; 'on'
      'WTSERVER' =&gt; 'windows'
      'WT_SITE' =&gt; 'merkhaus.test'
      'SERVER_SITE' =&gt; 'merkhaus.test'
      'SERVER_NAME' =&gt; 'merkhaus.test'
      'REDIRECT_STATUS' =&gt; '200'
      'SERVER_PORT' =&gt; '80'
      'SERVER_ADDR' =&gt; '127.0.0.1'
      'REMOTE_PORT' =&gt; '31478'
      'REMOTE_ADDR' =&gt; '127.0.0.1'
      'SERVER_SOFTWARE' =&gt; 'nginx/1.15.9'
      'GATEWAY_INTERFACE' =&gt; 'CGI/1.1'
      'REQUEST_SCHEME' =&gt; 'http'
      'SERVER_PROTOCOL' =&gt; 'HTTP/1.1'
      'DOCUMENT_ROOT' =&gt; 'c:/WinNMP/www/merkhaus/web'
      'DOCUMENT_URI' =&gt; '/index.php'
      'REQUEST_URI' =&gt; '/index.php?p=admin/install'
      'SCRIPT_NAME' =&gt; '/index.php'
      'CONTENT_LENGTH' =&gt; ''
      'CONTENT_TYPE' =&gt; ''
      'REQUEST_METHOD' =&gt; 'GET'
      'QUERY_STRING' =&gt; 'p=admin/install'
      'SCRIPT_FILENAME' =&gt; 'c:/WinNMP/www/merkhaus/web/index.php'
      'PATH_INFO' =&gt; ''
      'FCGI_ROLE' =&gt; 'RESPONDER'
      'PHP_SELF' =&gt; ''
      'REQUEST_TIME_FLOAT' =&gt; 1557070457.5755
      'REQUEST_TIME' =&gt; 1557070457
      'ENVIRONMENT' =&gt; 'dev'
      'SECURITY_KEY' =&gt; '••••••••••••••••••••••••••••••••'
      'DB_DRIVER' =&gt; 'mysql'
      'DB_SERVER' =&gt; 'localhost'
      'DB_USER' =&gt; '••••••••••'
      'DB_PASSWORD' =&gt; '••••••••••'
      'DB_DATABASE' =&gt; 'merkhaus'
      'DB_SCHEMA' =&gt; ''
      'DB_TABLE_PREFIX' =&gt; ''
      'DB_PORT' =&gt; '3366'
      'DEFAULT_SITE_URL' =&gt; '/'
      'ASSET_BASE_URL' =&gt; 'http://merkhaus.test/images'
      'GOOGLE_CLOUD_STORAGE_PROJECT_ID' =&gt; '••••••••••'
  ]
  </code></pre>
  
  <p>and my .env file ...</p>
  
  <pre><code>ENVIRONMENT="dev"
  
  SECURITY_KEY="*************************"
  
  DB_DRIVER="mysql"
  
  DB_SERVER="localhost"
  
  DB_USER="**********"
  
  DB_PASSWORD="*******************"
  
  DB_DATABASE="merkhaus"
  
  DB_SCHEMA=""
  
  DB_TABLE_PREFIX=""
  
  DB_PORT="3366"
  
  DEFAULT_SITE_URL="/"
  
  ASSET_BASE_URL="http://merkhaus.test/images"
  
  GOOGLE_CLOUD_STORAGE_PROJECT_ID="**************"
  
  </code></pre>
  
Tags: <craft3><database><installation><configuration>
Title: Craft "Unsupported DB driver" error after resetting Windows
ThreadText: # Craft "Unsupported DB driver" error after resetting Windows
  
  (Asked by: username_0 on 2019-05-05)
  
  I'm using WinNMP for my local dev environment. I installed and configured everything successfully last week, and everything was running well. Unfortunately, I needed to reset my windows installation to clear up some disk I/O issues. After the reset, I rebuilt the dev environment (MySQL, WinNMP, VSCode, etc.) and restored all the project files and settings (nginx server blocks, databases, etc.) Now, my Craft site is giving me an internal server error..."unsupported DB driver", which is set to 'mysql' in .env.
  
  I've verified that my MySQL install is working. I'm able to connect and query successfully with a simple php script using the same credentials. My PHP requirements check shows no concerns. What else may be the issue? i wasn't sure if I need to do any Composer installs or checks after restoring the project files.
  
  Here's the full stack trace...
  
  ```
  2019-05-05 15:34:17 [-][-][-][error][craft\base\ApplicationTrait::getIsDbConnectionValid] There was a problem connecting to the database: Unsupported DB driver value: 
  2019-05-05 15:34:17 [-][-][-][error][yii\web\HttpException:503] craft\web\ServiceUnavailableHttpException in C:\WinNMP\WWW\merkhaus\vendor\craftcms\cms\src\web\Application.php:533
  Stack trace:
  #0 C:\WinNMP\WWW\merkhaus\vendor\craftcms\cms\src\web\Application.php(187): craft\web\Application->_processInstallRequest(Object(craft\web\Request))
  #1 C:\WinNMP\WWW\merkhaus\vendor\yiisoft\yii2\base\Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
  #2 C:\WinNMP\WWW\merkhaus\web\index.php(21): yii\base\Application->run()
  #3 {main}
  2019-05-05 15:34:17 [-][-][-][profile begin][craft\web\View::renderTemplate] 503
  2019-05-05 15:34:17 [-][-][-][profile begin][craft\web\twig\Template::display] 503
  2019-05-05 15:34:17 [-][-][-][profile begin][craft\web\twig\Template::display] _layouts/message
  2019-05-05 15:34:17 [-][-][-][profile begin][craft\web\twig\Template::display] _layouts/base
  2019-05-05 15:34:17 [-][-][-][info][application] $_GET = [
      'p' => 'admin/install'
  ]
  
  $_POST = []
  
  $_FILES = []
  
  $_COOKIE = []
  
  $_SERVER = [
      'ALLUSERSPROFILE' => 'C:\\ProgramData'
      'APPDATA' => 'C:\\Users\\jimme\\AppData\\Roaming'
      'CommonProgramFiles' => 'C:\\Program Files\\Common Files'
      'CommonProgramFiles(x86)' => 'C:\\Program Files (x86)\\Common Files'
      'CommonProgramW6432' => 'C:\\Program Files\\Common Files'
      'COMPOSER_CACHE_DIR' => 'c:\\winnmp\\bin\\composer'
      'COMPOSER_HOME' => 'c:\\winnmp\\bin\\composer'
      'COMPUTERNAME' => 'DESKTOP-R7F7LDM'
      'ComSpec' => 'C:\\WINDOWS\\system32\\cmd.exe'
      'DriverData' => 'C:\\Windows\\System32\\Drivers\\DriverData'
      'FPS_BROWSER_APP_PROFILE_STRING' => 'Internet Explorer'
      'FPS_BROWSER_USER_PROFILE_STRING' => 'Default'
      'HOMEDRIVE' => 'C:'
      'HOMEPATH' => '\\Users\\jimme'
      'INTEL_DEV_REDIST' => 'C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\'
      'LOCALAPPDATA' => 'C:\\Users\\jimme\\AppData\\Local'
      'LOGONSERVER' => '\\\\DESKTOP-R7F7LDM'
      'MIC_LD_LIBRARY_PATH' => 'C:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\compiler\\lib\\mic'
      'NUMBER_OF_PROCESSORS' => '12'
      'OPENSSL_CONF' => 'c:\\winnmp\\conf\\openssl.conf'
      'OS' => 'Windows_NT'
      'PATHEXT' => '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW'
      'PROCESSOR_ARCHITECTURE' => 'AMD64'
      'PROCESSOR_IDENTIFIER' => 'Intel64 Family 6 Model 62 Stepping 4, GenuineIntel'
      'PROCESSOR_LEVEL' => '6'
      'PROCESSOR_REVISION' => '3e04'
      'ProgramData' => 'C:\\ProgramData'
      'ProgramFiles' => 'C:\\Program Files'
      'ProgramFiles(x86)' => 'C:\\Program Files (x86)'
      'ProgramW6432' => 'C:\\Program Files'
      'PSModulePath' => '%ProgramFiles%\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules'
      'PUBLIC' => 'C:\\Users\\Public'
      'SESSIONNAME' => 'Console'
      'SystemDrive' => 'C:'
      'SystemRoot' => 'C:\\WINDOWS'
      'TEMP' => 'c:\\winnmp\\tmp'
      'TMP' => 'c:\\winnmp\\tmp'
      'USERDOMAIN' => 'DESKTOP-R7F7LDM'
      'USERDOMAIN_ROAMINGPROFILE' => 'DESKTOP-R7F7LDM'
      'USERNAME' => 'jimme'
      'USERPROFILE' => 'C:\\Users\\jimme'
      'windir' => 'C:\\WINDOWS'
      'WINNMP' => 'windows'
      'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.9'
      'HTTP_ACCEPT_ENCODING' => 'gzip, deflate'
      'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3'
      'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36'
      'HTTP_UPGRADE_INSECURE_REQUESTS' => '1'
      'HTTP_CONNECTION' => 'keep-alive'
      'HTTP_HOST' => 'merkhaus.test'
      'REDIS' => 'localhost'
      'HTTP_MOD_REWRITE' => 'on'
      'WTSERVER' => 'windows'
      'WT_SITE' => 'merkhaus.test'
      'SERVER_SITE' => 'merkhaus.test'
      'SERVER_NAME' => 'merkhaus.test'
      'REDIRECT_STATUS' => '200'
      'SERVER_PORT' => '80'
      'SERVER_ADDR' => '127.0.0.1'
      'REMOTE_PORT' => '31478'
      'REMOTE_ADDR' => '127.0.0.1'
      'SERVER_SOFTWARE' => 'nginx/1.15.9'
      'GATEWAY_INTERFACE' => 'CGI/1.1'
      'REQUEST_SCHEME' => 'http'
      'SERVER_PROTOCOL' => 'HTTP/1.1'
      'DOCUMENT_ROOT' => 'c:/WinNMP/www/merkhaus/web'
      'DOCUMENT_URI' => '/index.php'
      'REQUEST_URI' => '/index.php?p=admin/install'
      'SCRIPT_NAME' => '/index.php'
      'CONTENT_LENGTH' => ''
      'CONTENT_TYPE' => ''
      'REQUEST_METHOD' => 'GET'
      'QUERY_STRING' => 'p=admin/install'
      'SCRIPT_FILENAME' => 'c:/WinNMP/www/merkhaus/web/index.php'
      'PATH_INFO' => ''
      'FCGI_ROLE' => 'RESPONDER'
      'PHP_SELF' => ''
      'REQUEST_TIME_FLOAT' => 1557070457.5755
      'REQUEST_TIME' => 1557070457
      'ENVIRONMENT' => 'dev'
      'SECURITY_KEY' => '••••••••••••••••••••••••••••••••'
      'DB_DRIVER' => 'mysql'
      'DB_SERVER' => 'localhost'
      'DB_USER' => '••••••••••'
      'DB_PASSWORD' => '••••••••••'
      'DB_DATABASE' => 'merkhaus'
      'DB_SCHEMA' => ''
      'DB_TABLE_PREFIX' => ''
      'DB_PORT' => '3366'
      'DEFAULT_SITE_URL' => '/'
      'ASSET_BASE_URL' => 'http://merkhaus.test/images'
      'GOOGLE_CLOUD_STORAGE_PROJECT_ID' => '••••••••••'
  ]
  
  ```
  
  and my .env file ...
  
  ```
  ENVIRONMENT="dev"
  
  SECURITY_KEY="*************************"
  
  DB_DRIVER="mysql"
  
  DB_SERVER="localhost"
  
  DB_USER="**********"
  
  DB_PASSWORD="*******************"
  
  DB_DATABASE="merkhaus"
  
  DB_SCHEMA=""
  
  DB_TABLE_PREFIX=""
  
  DB_PORT="3366"
  
  DEFAULT_SITE_URL="/"
  
  ASSET_BASE_URL="http://merkhaus.test/images"
  
  GOOGLE_CLOUD_STORAGE_PROJECT_ID="**************"
  
  ```
  
  **Tags:** craft3, database, installation, configuration
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-05-05. Score: 3 | Accepted answer
  
  Found the problem. I had to remove putenv from the disabled functions in php.ini
  
  
  ---
  
  ### Answer by username_1 on 2019-08-30. Score: 1
  
  In my case I was missing the .env file in my Atomic SFTP deploy. ‍♂️
  
  So the DB\_DRIVER setting was not there...
  
  
  ---
  
  