系统发生错误

[0] PDOException in Connection.php line 528

SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111)

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

Call Stack

  1. in Connection.php line 528
  2. at PDO->__construct('mysql:host=127.0.0.1...', 'root', '10@idccom', [2, 1, 'SET NAMES utf8', ...]) in Connection.php line 528
  3. at Connection->connect() in Connection.php line 2022
  4. at Connection->initConnect(false) in Connection.php line 644
  5. at Connection->query('SHOW COLUMNS FROM `s...', [], false, true) in Mysql.php line 90
  6. at Mysql->getFields('stb_topic') in Connection.php line 377
  7. at Connection->getTableInfo('stb_topic', 'bind') in Connection.php line 454
  8. at Connection->getFieldsBind('stb_topic') in Builder.php line 292
  9. at Builder->buildWhere(object(Query), ['AND' => [['cid', '=', '1'], object(Expression)]]) in Builder.php line 264
  10. at Builder->parseWhere(object(Query), ['AND' => [['cid', '=', '1'], object(Expression)]]) in Builder.php line 989
  11. at Builder->select(object(Query)) in Connection.php line 1277
  12. at Connection->value(object(Query), 'COUNT(*) AS tp_count', 0) in Connection.php line 1323
  13. at Connection->aggregate(object(Query), 'COUNT', '*') in Query.php line 623
  14. at Query->aggregate('COUNT', '*', true) in Query.php line 658
  15. at Query->count() in Query.php line 1772
  16. at Query->paginate(10) in Category.php line 46
  17. at Category->topic('1')
  18. at ReflectionMethod->invokeArgs(object(Category), ['1']) in Container.php line 395
  19. at Container->invokeReflectMethod(object(Category), object(ReflectionMethod), ['id' => '1']) in Module.php line 132
  20. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  21. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  22. at Middleware->think\{closure}(object(Request))
  23. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  24. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  25. at Module->exec() in Dispatch.php line 168
  26. at Dispatch->run() in App.php line 432
  27. at App->think\{closure}(object(Request), object(Closure), null)
  28. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  29. at Middleware->think\{closure}(object(Request))
  30. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  31. at Middleware->dispatch(object(Request)) in App.php line 435
  32. at App->run() in index.php line 24

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_PATH_INFO category/topic/id/1.html
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_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_IF_MODIFIED_SINCE Wed, 19 Jun 2024 19:23:49 GMT
HTTP_ACCEPT_ENCODING br,gzip
HTTP_HOST forum.imcs.org.cn
HTTP_CONNECTION Keep-Alive
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LD_LIBRARY_PATH /usr/local/apache/lib
SERVER_SIGNATURE
SERVER_SOFTWARE Apache/2.4.25 (Unix) PHP/5.6.13
SERVER_NAME forum.imcs.org.cn
SERVER_ADDR 172.18.126.101
SERVER_PORT 80
REMOTE_ADDR 18.97.9.170
DOCUMENT_ROOT /data/www/imcs/mystartbbs
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /data/www/imcs/mystartbbs
SERVER_ADMIN webmaster@forum.imcs.org.cn
SCRIPT_FILENAME /data/www/imcs/mystartbbs/index.php
REMOTE_PORT 59702
REDIRECT_URL /category/topic/id/1.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /category/topic/id/1.html
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1733178422.374
REQUEST_TIME 1733178422
Environment Variablesempty
ThinkPHP Constants
APP_PATH /data/www/imcs/mystartbbs/app/
ROOT_PATH /data/www/imcs/mystartbbs/
DS /

[1] ErrorException in think_exception.tpl line 417

Uncaught exception 'think\exception\ErrorException' with message 'Use of undefined constant APPLICATION_VERSION - assumed 'APPLICATION_VERSION'' in /data/www/imcs/mystartbbs/thinkphp/tpl/think_exception.tpl:417
Stack trace:
#0 /data/www/imcs/mystartbbs/thinkphp/tpl/think_exception.tpl(417): think\Error::appError(8, 'Use of undefine...', '/data/www/imcs/...', 417, Array)
#1 /data/www/imcs/mystartbbs/thinkphp/library/think/exception/Handle.php(184): include('/data/www/imcs/...')
#2 /data/www/imcs/mystartbbs/thinkphp/library/think/exception/Handle.php(97): think\exception\Handle->convertExceptionToResponse(Object(PDOException))
#3 /data/www/imcs/mystartbbs/thinkphp/library/think/Error.php(56): think\exception\Handle->render(Object(PDOException))
#4 [internal function]: think\Error::appException(Object(PDOException))
#5 {main}
thrown

  1. </tbody>
  2. <?php } ?>
  3. </table>
  4. <?php } ?>
  5. </div>
  6. <?php } ?>
  7. <div class="copyright">
  8. <a title="ShopXO官网" href="http://www.folieyun.com"target="_blank">福利云FolieYUN 官网</a>
  9. <span><?php echo APPLICATION_VERSION; ?></span>
  10. <a title="ShopXO社区" href="http://www.folieyun.com" target="_blank" class="shopxo-ask">福利云FolieYUN 社区</a>
  11. <span>{ 国内领先企业级B2C免费开源电商系统! }</span>
  12. </div>
  13. <?php if(\think\facade\App::isDebug()) { ?>
  14. <script>
  15. var LINE = <?php echo $line; ?>;
  16. function $(selector, node){
  17. var elements;

Call Stack

  1. in think_exception.tpl line 417
  2. at Error::appShutdown()

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_PATH_INFO category/topic/id/1.html
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_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_IF_MODIFIED_SINCE Wed, 19 Jun 2024 19:23:49 GMT
HTTP_ACCEPT_ENCODING br,gzip
HTTP_HOST forum.imcs.org.cn
HTTP_CONNECTION Keep-Alive
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LD_LIBRARY_PATH /usr/local/apache/lib
SERVER_SIGNATURE
SERVER_SOFTWARE Apache/2.4.25 (Unix) PHP/5.6.13
SERVER_NAME forum.imcs.org.cn
SERVER_ADDR 172.18.126.101
SERVER_PORT 80
REMOTE_ADDR 18.97.9.170
DOCUMENT_ROOT /data/www/imcs/mystartbbs
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /data/www/imcs/mystartbbs
SERVER_ADMIN webmaster@forum.imcs.org.cn
SCRIPT_FILENAME /data/www/imcs/mystartbbs/index.php
REMOTE_PORT 59702
REDIRECT_URL /category/topic/id/1.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /category/topic/id/1.html
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1733178422.374
REQUEST_TIME 1733178422
Environment Variablesempty
ThinkPHP Constants
APP_PATH /data/www/imcs/mystartbbs/app/
ROOT_PATH /data/www/imcs/mystartbbs/
DS /