系统发生错误

[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_user') in Connection.php line 377
  7. at Connection->getTableInfo('stb_user', 'bind') in Connection.php line 454
  8. at Connection->getFieldsBind('stb_user') in Builder.php line 292
  9. at Builder->buildWhere(object(Query), ['AND' => ['id' => ['id', '=', '1']]]) in Builder.php line 264
  10. at Builder->parseWhere(object(Query), ['AND' => ['id' => ['id', '=', '1']]]) in Builder.php line 989
  11. at Builder->select(object(Query)) in Connection.php line 828
  12. at Connection->find(object(Query)) in Query.php line 3120
  13. at Query->find('1')
  14. at call_user_func_array([object(Query), 'find'], ['1']) in Model.php line 1063
  15. at Model->__call('find', ['1']) in User.php line 188
  16. at User->find('1') in User.php line 188
  17. at User->home('1')
  18. at ReflectionMethod->invokeArgs(object(User), ['1']) in Container.php line 395
  19. at Container->invokeReflectMethod(object(User), 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 user/home/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 Mon, 22 Jul 2024 22:44:45 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 3.236.86.184
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 34348
REDIRECT_URL /user/home/id/1.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /user/home/id/1.html
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1729060992.721
REQUEST_TIME 1729060992
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 user/home/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 Mon, 22 Jul 2024 22:44:45 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 3.236.86.184
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 34348
REDIRECT_URL /user/home/id/1.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /user/home/id/1.html
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1729060992.721
REQUEST_TIME 1729060992
Environment Variablesempty
ThinkPHP Constants
APP_PATH /data/www/imcs/mystartbbs/app/
ROOT_PATH /data/www/imcs/mystartbbs/
DS /