[0] PDOException in Connection.php line 293

could not find driver

  1. $this->fetchType = $config['result_type'];
  2. }
  3. try {
  4. if (empty($config['dsn'])) {
  5. $config['dsn'] = $this->parseDsn($config);
  6. }
  7. if ($config['debug']) {
  8. $startTime = microtime(true);
  9. }
  10. $this->links[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $params);
  11. if ($config['debug']) {
  12. // 记录数据库连接信息
  13. Log::record('[ DB ] CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn'], 'sql');
  14. }
  15. } catch (\PDOException $e) {
  16. if ($autoConnection) {
  17. Log::record($e->getMessage(), 'error');
  18. return $this->connect($autoConnection, $linkNum);
  19. } else {

Call Stack

  1. in Connection.php line 293
  2. at PDO->__construct('mysql:host=127.0.0.1...', 'root', 'sifcadmin2004', [0, 2, 0, ...]) in Connection.php line 293
  3. at Connection->connect() in Connection.php line 989
  4. at Connection->initConnect(false) in Connection.php line 346
  5. at Connection->query('SHOW COLUMNS FROM `s...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('sifc_portal_post') in Query.php line 1757
  7. at Query->getTableInfo('sifc_portal_post', 'pk') in Query.php line 1791
  8. at Query->getPk(['alias' => ['sifc_portal_post' => 'post', 'sifc_portal_category_post' => 'relation'], 'field' => ['post.*'], 'join' => [[['__PORTAL_CATEGORY_POST__' => 'relation'], 'INNER', 'post.id = relation.p...']], ...]) in Query.php line 2462
  9. at Query->find() in PostService.php line 192
  10. at PostService->publishedArticle('460', '5') in ArticleController.php line 29
  11. at ArticleController->index()
  12. at ReflectionMethod->invokeArgs(object(ArticleController), []) in App.php line 343
  13. at App::invokeMethod([object(ArticleController), 'index'], []) in App.php line 595
  14. at App::module(['portal', 'article', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...], null) in App.php line 457
  15. at App::exec(['type' => 'module', 'module' => ['portal', 'article', 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...]) in App.php line 139
  16. at App::run() in index.php line 41

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_STATUS
200
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_HOST
www.sifc.net.cn:1080
HTTP_CONNECTION
Keep-Alive
HTTP_ACCEPT_ENCODING
gzip
PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\QCloud\Monitor\Barad;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
SystemRoot
C:\Windows
COMSPEC
C:\Windows\system32\cmd.exe
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR
C:\Windows
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache/2.4.23 (Win32) OpenSSL/1.0.2j PHP/5.5.38
SERVER_NAME
www.sifc.net.cn
SERVER_ADDR
10.104.140.34
SERVER_PORT
1080
REMOTE_ADDR
54.146.206.127
DOCUMENT_ROOT
C:/phpStudy/PHPTutorial/WWW/www/sifc-en/public
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
C:/phpStudy/PHPTutorial/WWW/www/sifc-en/public
SERVER_ADMIN
admin@php.cn
SCRIPT_FILENAME
C:/phpStudy/PHPTutorial/WWW/www/sifc-en/public/index.php
REMOTE_PORT
52362
REDIRECT_URL
/portal/article/index/id/460/cid/5.html
REDIRECT_QUERY_STRING
s=portal/article/index/id/460/cid/5.html
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
s=portal/article/index/id/460/cid/5.html
REQUEST_URI
/portal/article/index/id/460/cid/5.html
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1547601928.682
REQUEST_TIME
1547601928
argv
[ "s=portal\/article\/index\/id\/460\/cid\/5.html" ]
argc
1
PATH_INFO
portal/article/index/id/460/cid/5.html

Environment Variables

ALLUSERSPROFILE
C:\ProgramData
APPDATA
C:\Windows\system32\config\systemprofile\AppData\Roaming
CommonProgramFiles
C:\Program Files (x86)\Common Files
CommonProgramFiles(x86)
C:\Program Files (x86)\Common Files
CommonProgramW6432
C:\Program Files\Common Files
COMPUTERNAME
10_104_140_34
ComSpec
C:\Windows\system32\cmd.exe
LOCALAPPDATA
C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS
2
OS
Windows_NT
Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\QCloud\Monitor\Barad;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE
x86
PROCESSOR_ARCHITEW6432
AMD64
PROCESSOR_IDENTIFIER
Intel64 Family 6 Model 63 Stepping 2, GenuineIntel
PROCESSOR_LEVEL
6
PROCESSOR_REVISION
3f02
ProgramData
C:\ProgramData
ProgramFiles
C:\Program Files (x86)
ProgramFiles(x86)
C:\Program Files (x86)
ProgramW6432
C:\Program Files
PSModulePath
C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC
C:\Users\Public
SystemDrive
C:
SystemRoot
C:\Windows
TEMP
C:\Windows\TEMP
TMP
C:\Windows\TEMP
USERDOMAIN
WORKGROUP
USERNAME
10_104_140_34$
USERPROFILE
C:\Windows\system32\config\systemprofile
windir
C:\Windows
AP_PARENT_PID
1680

ThinkPHP Constants

APP_DEBUG
true
CMF_ROOT
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/../
APP_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/../app/
CMF_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/../simplewind/cmf/
PLUGINS_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/plugins/
EXTEND_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/../simplewind/extend/
VENDOR_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/../simplewind/vendor/
RUNTIME_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/../data/runtime/
THINKCMF_VERSION
5.0.180123
THINK_VERSION
5.0.14
THINK_START_TIME
1547601928.6978
THINK_START_MEM
146296
EXT
.php
DS
\
THINK_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\simplewind\thinkphp\
LIB_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\simplewind\thinkphp\library\
CORE_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\simplewind\thinkphp\library\think\
TRAIT_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\simplewind\thinkphp\library\traits\
ROOT_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\
LOG_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/../data/runtime/log\
CACHE_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/../data/runtime/cache\
TEMP_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/../data/runtime/temp\
CONF_PATH
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\public/../app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true
HTMLPURIFIER_PREFIX
C:\phpStudy\PHPTutorial\WWW\www\sifc-en\simplewind\vendor\ezyang\htmlpurifier\library
QINIU_FUNCTIONS_VERSION
7.2.1
0.435235s