[2002] PDOException in Connection.php line 295

  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 295
  2. at PDO->__construct('mysql:host=localhost...', 'kaifei2019123', 'ph23fsq5', [0, 2, 0, ...]) in Connection.php line 295
  3. at Connection->connect() in Connection.php line 995
  4. at Connection->initConnect(false) in Connection.php line 348
  5. at Connection->query('SHOW COLUMNS FROM `d...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('dp_admin_config') in Query.php line 1921
  7. at Query->getTableInfo('__ADMIN_CONFIG__', 'type') in Query.php line 1969
  8. at Query->getFieldsType('__ADMIN_CONFIG__') in Query.php line 1975
  9. at Query->getFieldsBind('__ADMIN_CONFIG__') in Builder.php line 270
  10. at Builder->buildWhere([], ['field' => ['name', 'value', 'type'], 'table' => '__ADMIN_CONFIG__', 'where' => [], ...]) in Builder.php line 240
  11. at Builder->parseWhere([], ['field' => ['name', 'value', 'type'], 'table' => '__ADMIN_CONFIG__', 'where' => [], ...]) in Builder.php line 719
  12. at Builder->select(['field' => ['name', 'value', 'type'], 'table' => '__ADMIN_CONFIG__', 'where' => [], ...]) in Query.php line 2462
  13. at Query->getPdo() in Query.php line 491
  14. at Query->column('value,type', 'name')
  15. at call_user_func_array([object(Query), 'column'], ['value,type', 'name']) in Model.php line 2190
  16. at Model->__call('column', ['value,type', 'name']) in Config.php line 35
  17. at Config->column('value,type', 'name') in Config.php line 35
  18. at Config->getConfig() in Config.php line 113
  19. at Config->run(['type' => 'module', 'module' => ['cms', 'forum.php', null]], null) in Hook.php line 137
  20. at Hook::exec('app\common\behavior\...', 'app_begin', ['type' => 'module', 'module' => ['cms', 'forum.php', null]], null) in Hook.php line 95
  21. at Hook::listen('app_begin', ['type' => 'module', 'module' => ['cms', 'forum.php', null]]) in App.php line 130
  22. at App::run() in start.php line 19
  23. at require('D:\wwwroot\kaifei201...') in index.php line 34

Environment Variables

GET Data

mod
viewthread
tid
7954
extra
page=1
POST Data
empty
Files
empty

Cookies

PHPSESSID
deg2rsift1ojnq6tv2efgkadv1
Session
empty

Server/Request Data

_FCGI_X_PIPE_
\\.\pipe\IISFCGI-cd0d7a27-fca1-4672-930a-96f9228811ac
PHP_FCGI_MAX_REQUESTS
1000
PHPRC
C:\php_56
ALLUSERSPROFILE
C:\ProgramData
APPDATA
C:\Windows\system32\config\systemprofile\AppData\Roaming
APP_POOL_CONFIG
C:\inetpub\temp\apppools\kaifei2019123\kaifei2019123.config
APP_POOL_ID
kaifei2019123
CommonProgramFiles
C:\Program Files (x86)\Common Files
CommonProgramFiles(x86)
C:\Program Files (x86)\Common Files
CommonProgramW6432
C:\Program Files\Common Files
COMPUTERNAME
EBS-2020
ComSpec
C:\Windows\system32\cmd.exe
LOCALAPPDATA
C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS
8
OS
Windows_NT
Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\php_52;D:\mysql\bin;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 45 Stepping 7, GenuineIntel
PROCESSOR_LEVEL
6
PROCESSOR_REVISION
2d07
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
EBS-2020$
USERPROFILE
C:\Windows\system32\config\systemprofile
windir
C:\Windows
ORIG_PATH_INFO
/index.php/forum.php
URL
/index.php
SERVER_SOFTWARE
Microsoft-IIS/10.0
SERVER_PROTOCOL
HTTP/1.1
SERVER_PORT_SECURE
0
SERVER_PORT
80
SERVER_NAME
www.chemphys.com
SCRIPT_NAME
/index.php
SCRIPT_FILENAME
D:\wwwroot\kaifei2019123\wwwroot\index.php
REQUEST_URI
/forum.php?mod=viewthread&tid=7954&extra=page%3D1
REQUEST_METHOD
GET
REMOTE_USER
REMOTE_PORT
56108
REMOTE_HOST
127.0.0.1
REMOTE_ADDR
127.0.0.1
QUERY_STRING
mod=viewthread&tid=7954&extra=page%3D1
PATH_TRANSLATED
D:\wwwroot\kaifei2019123\wwwroot\index.php\forum.php
PATH_INFO
/forum.php
LOGON_USER
LOCAL_ADDR
127.0.0.1
INSTANCE_META_PATH
/LM/W3SVC/10471
INSTANCE_NAME
KAIFEI2019123
INSTANCE_ID
10471
HTTPS_SERVER_SUBJECT
HTTPS_SERVER_ISSUER
HTTPS_SECRETKEYSIZE
HTTPS_KEYSIZE
HTTPS
off
GATEWAY_INTERFACE
CGI/1.1
DOCUMENT_ROOT
D:\wwwroot\kaifei2019123\wwwroot
CONTENT_TYPE
application/x-www-form-urlencoded
CONTENT_LENGTH
0
CERT_SUBJECT
CERT_SERIALNUMBER
CERT_ISSUER
CERT_FLAGS
CERT_COOKIE
AUTH_USER
AUTH_PASSWORD
AUTH_TYPE
APPL_PHYSICAL_PATH
D:\wwwroot\kaifei2019123\wwwroot\
APPL_MD_PATH
/LM/W3SVC/10471/ROOT
IIS_UrlRewriteModule
7.1.1980.0
UNENCODED_URL
/forum.php?mod=viewthread&tid=7954&extra=page%3D1
IIS_WasUrlRewritten
1
HTTP_X_ORIGINAL_URL
/forum.php?mod=viewthread&tid=7954&extra=page%3D1
HTTP_X_REAL_IP
118.123.10.155
HTTP_X_FORWARDED_FOR
23.19.71.20
HTTP_USER_AGENT
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
HTTP_HOST
www.chemphys.com
HTTP_COOKIE
PHPSESSID=deg2rsift1ojnq6tv2efgkadv1
HTTP_ACCEPT_CHARSET
utf-8
HTTP_ACCEPT
*/*
HTTP_CONTENT_TYPE
application/x-www-form-urlencoded
HTTP_CONTENT_LENGTH
0
HTTP_CONNECTION
close
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/forum.php
REQUEST_TIME_FLOAT
1557271949.7974
REQUEST_TIME
1557271949
Environment Variables
empty

ThinkPHP Constants

BIND_MODULE
cms
APP_PATH
D:\wwwroot\kaifei2019123\wwwroot/application/
ADMIN_FILE
admin.php
THINK_VERSION
5.0.24
THINK_START_TIME
1557271949.7997
THINK_START_MEM
140088
EXT
.php
DS
\
THINK_PATH
D:\wwwroot\kaifei2019123\wwwroot\thinkphp\
LIB_PATH
D:\wwwroot\kaifei2019123\wwwroot\thinkphp\library\
CORE_PATH
D:\wwwroot\kaifei2019123\wwwroot\thinkphp\library\think\
TRAIT_PATH
D:\wwwroot\kaifei2019123\wwwroot\thinkphp\library\traits\
ROOT_PATH
D:\wwwroot\kaifei2019123\wwwroot\
EXTEND_PATH
D:\wwwroot\kaifei2019123\wwwroot\extend\
VENDOR_PATH
D:\wwwroot\kaifei2019123\wwwroot\vendor\
RUNTIME_PATH
D:\wwwroot\kaifei2019123\wwwroot\runtime\
LOG_PATH
D:\wwwroot\kaifei2019123\wwwroot\runtime\log\
CACHE_PATH
D:\wwwroot\kaifei2019123\wwwroot\runtime\cache\
TEMP_PATH
D:\wwwroot\kaifei2019123\wwwroot\runtime\temp\
CONF_PATH
D:\wwwroot\kaifei2019123\wwwroot/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true
HTMLPURIFIER_PREFIX
D:\wwwroot\kaifei2019123\wwwroot\vendor\ezyang\htmlpurifier\library
PUBLIC_PATH
/public/