System Error

[2002] PDOException in Connection.php line 295

SQLSTATE[HY000] [2002] No such file or directory

  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...', 'lante_com_cn', 'fS26HimHWLFmJf6w', [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 `g...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('gm_language') in Query.php line 1921
  7. at Query->getTableInfo('gm_language', 'type') in Query.php line 1969
  8. at Query->getFieldsType('gm_language') in Query.php line 1975
  9. at Query->getFieldsBind('gm_language') in Builder.php line 270
  10. at Builder->buildWhere(['AND' => [['exp', object(Expression)]]], ['where' => ['AND' => [['exp', object(Expression)]]], 'field' => ['mark'], 'table' => 'gm_language', ...]) in Builder.php line 240
  11. at Builder->parseWhere(['AND' => [['exp', object(Expression)]]], ['where' => ['AND' => [['exp', object(Expression)]]], 'field' => ['mark'], 'table' => 'gm_language', ...]) in Builder.php line 719
  12. at Builder->select(['where' => ['AND' => [['exp', object(Expression)]]], 'field' => ['mark'], 'table' => 'gm_language', ...]) in Query.php line 2462
  13. at Query->getPdo() in Query.php line 491
  14. at Query->column('mark') in common.php line 107
  15. at get_langs() in route.php line 40
  16. at include('/www/wwwroot/lante.c...') in App.php line 641
  17. at App::routeCheck(object(Request), ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 116
  18. at App::run() in start.php line 19
  19. at require('/www/wwwroot/lante.c...') in index.php line 18

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
REDIRECT_PATH_INFO
en/product/medical-applications
REDIRECT_HTTPS
on
REDIRECT_SSL_TLS_SNI
www.lante.com.cn
REDIRECT_STATUS
200
HTTPS
on
SSL_TLS_SNI
www.lante.com.cn
proxy-nokeepalive
1
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_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_ACCEPT_ENCODING
br,gzip
HTTP_HOST
www.lante.com.cn
HTTP_CONNECTION
Keep-Alive
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH
/www/server/apache/lib
SERVER_SIGNATURE
<address>Apache Server at www.lante.com.cn Port 443</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
www.lante.com.cn
SERVER_ADDR
172.19.102.160
SERVER_PORT
443
REMOTE_ADDR
34.200.236.68
DOCUMENT_ROOT
/www/wwwroot/lante.com.cn/
REQUEST_SCHEME
https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/lante.com.cn/
SERVER_ADMIN
webmasterexample.com
SCRIPT_FILENAME
/www/wwwroot/lante.com.cn/index.php
REMOTE_PORT
53534
REDIRECT_URL
/en/product/medical-applications
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/en/product/medical-applications
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1600687822.096
REQUEST_TIME
1600687822
PATH_INFO
en/product/medical-applications
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/lante.com.cn/application/
THINK_VERSION
5.0.24
THINK_START_TIME
1600687822.1083
THINK_START_MEM
273872
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/lante.com.cn/thinkphp/
LIB_PATH
/www/wwwroot/lante.com.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/lante.com.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/lante.com.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/lante.com.cn/
EXTEND_PATH
/www/wwwroot/lante.com.cn/extend/
VENDOR_PATH
/www/wwwroot/lante.com.cn/vendor/
RUNTIME_PATH
/www/wwwroot/lante.com.cn/runtime/
LOG_PATH
/www/wwwroot/lante.com.cn/runtime/log/
CACHE_PATH
/www/wwwroot/lante.com.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/lante.com.cn/runtime/temp/
CONF_PATH
/www/wwwroot/lante.com.cn/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
HELPER_PATH
/www/wwwroot/lante.com.cn/application/common/helper/
INCLUDE_PATH
/www/wwwroot/lante.com.cn/application/common/include/
IS_CLI
false
IS_WIN
false
__ROOT__
PUBLIC_PATH
/public

[1] ErrorException in Connection.php line 295

Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory' in /www/wwwroot/lante.com.cn/thinkphp/library/think/db/Connection.php:295
Stack trace:
#0 /www/wwwroot/lante.com.cn/thinkphp/library/think/db/Connection.php(295): PDO->__construct('mysql:host=loca...', 'lante_com_cn', 'fS26HimHWLFmJf6...', Array)
#1 /www/wwwroot/lante.com.cn/thinkphp/library/think/db/Connection.php(995): think\db\Connection->connect()
#2 /www/wwwroot/lante.com.cn/thinkphp/library/think/db/Connection.php(348): think\db\Connection->initConnect(false)
#3 /www/wwwroot/lante.com.cn/thinkphp/library/think/db/connector/Mysql.php(65): think\db\Connection->query('SHOW COLUMNS FR...', Array, false, true)
#4 /www/wwwroot/lante.com.cn/thinkphp/library/think/db/Query.php(1921): think\db\connector\Mysql->getFields('gm_config')
#5 /www/wwwroot/lante.com.cn/thinkphp/library/think/db/Query.php(1969): think\db\Query->getTableInfo('gm_config', 'type')
#6 /www/wwwroot/lante.com.cn/thinkphp/library/think/db/Query.php

  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 Error::appShutdown()

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
REDIRECT_PATH_INFO
en/product/medical-applications
REDIRECT_HTTPS
on
REDIRECT_SSL_TLS_SNI
www.lante.com.cn
REDIRECT_STATUS
200
HTTPS
on
SSL_TLS_SNI
www.lante.com.cn
proxy-nokeepalive
1
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_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_ACCEPT_ENCODING
br,gzip
HTTP_HOST
www.lante.com.cn
HTTP_CONNECTION
Keep-Alive
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH
/www/server/apache/lib
SERVER_SIGNATURE
<address>Apache Server at www.lante.com.cn Port 443</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
www.lante.com.cn
SERVER_ADDR
172.19.102.160
SERVER_PORT
443
REMOTE_ADDR
34.200.236.68
DOCUMENT_ROOT
/www/wwwroot/lante.com.cn/
REQUEST_SCHEME
https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/lante.com.cn/
SERVER_ADMIN
webmasterexample.com
SCRIPT_FILENAME
/www/wwwroot/lante.com.cn/index.php
REMOTE_PORT
53534
REDIRECT_URL
/en/product/medical-applications
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/en/product/medical-applications
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1600687822.096
REQUEST_TIME
1600687822
PATH_INFO
en/product/medical-applications
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/lante.com.cn/application/
THINK_VERSION
5.0.24
THINK_START_TIME
1600687822.1083
THINK_START_MEM
273872
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/lante.com.cn/thinkphp/
LIB_PATH
/www/wwwroot/lante.com.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/lante.com.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/lante.com.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/lante.com.cn/
EXTEND_PATH
/www/wwwroot/lante.com.cn/extend/
VENDOR_PATH
/www/wwwroot/lante.com.cn/vendor/
RUNTIME_PATH
/www/wwwroot/lante.com.cn/runtime/
LOG_PATH
/www/wwwroot/lante.com.cn/runtime/log/
CACHE_PATH
/www/wwwroot/lante.com.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/lante.com.cn/runtime/temp/
CONF_PATH
/www/wwwroot/lante.com.cn/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
HELPER_PATH
/www/wwwroot/lante.com.cn/application/common/helper/
INCLUDE_PATH
/www/wwwroot/lante.com.cn/application/common/include/
IS_CLI
false
IS_WIN
false
__ROOT__
PUBLIC_PATH
/public