System Error

[2] ErrorException in Session.php line 106

session_start(): Cannot start session when headers already sent

  1. // 读取session驱动
  2. $class = false !== strpos($config['type'], '\\') ? $config['type'] : '\\think\\session\\driver\\' . ucwords($config['type']);
  3. // 检查驱动类
  4. if (!class_exists($class) || !session_set_save_handler(new $class($config))) {
  5. throw new ClassNotFoundException('error session handler:' . $class, $class);
  6. }
  7. }
  8. if ($isDoStart) {
  9. session_start();
  10. self::$init = true;
  11. } else {
  12. self::$init = false;
  13. }
  14. }
  15. /**
  16. * session自动启动或者初始化
  17. * @return void

Call Stack

  1. in Session.php line 106
  2. at Error::appError(2, 'session_start(): Can...', '/www/wwwroot/yili2.h...', 106, ['config' => ['id' => '', 'var_session_id' => '', 'prefix' => 'think', ...], 'isDoStart' => true])
  3. at session_start() in Session.php line 106
  4. at Session::init() in Session.php line 120
  5. at Session::boot() in Session.php line 138
  6. at Session::set('__token__', '793e63b0359e7372bb5d...') in Request.php line 1572
  7. at Request->token('__token__', 'md5') in helper.php line 552
  8. at token() in d6ff49de334da8808b1cf28c17180fbb.php line 85
  9. at include('/www/wwwroot/yili2.h...') in File.php line 53
  10. at File->read('/www/wwwroot/yili2.h...', ['user' => null, 'site' => ['name' => '伊利订货会', 'beian' => '', 'cdnurl' => '', ...], 'config' => ['site' => ['name' => '伊利订货会', 'cdnurl' => '', 'version' => 1716589136, ...], 'upload' => ['cdnurl' => '', 'uploadurl' => '/index/ajax/upload', 'bucket' => 'local', ...], 'modulename' => 'index', ...], ...]) in Template.php line 188
  11. at Template->fetch('/www/wwwroot/yili2.h...', ['user' => null, 'site' => ['name' => '伊利订货会', 'beian' => '', 'cdnurl' => '', ...], 'config' => ['site' => ['name' => '伊利订货会', 'cdnurl' => '', 'version' => 1716589136, ...], 'upload' => ['cdnurl' => '', 'uploadurl' => '/index/ajax/upload', 'bucket' => 'local', ...], 'modulename' => 'index', ...], ...], []) in Think.php line 86
  12. at Think->fetch('/www/wwwroot/yili2.h...', ['user' => null, 'site' => ['name' => '伊利订货会', 'beian' => '', 'cdnurl' => '', ...], 'config' => ['site' => ['name' => '伊利订货会', 'cdnurl' => '', 'version' => 1716589136, ...], 'upload' => ['cdnurl' => '', 'uploadurl' => '/index/ajax/upload', 'bucket' => 'local', ...], 'modulename' => 'index', ...], ...], []) in View.php line 163
  13. at View->fetch() in User.php line 193
  14. at User->login()
  15. at ReflectionMethod->invokeArgs(object(User), []) in App.php line 343
  16. at App::invokeMethod([object(User), 'login'], []) in App.php line 611
  17. at App::module(['index', 'user', 'login'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  18. at App::exec(['type' => 'module', 'module' => ['index', 'user', 'login']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  19. at App::run() in start.php line 19
  20. at require('/www/wwwroot/yili2.h...') in index.php line 23

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
SCRIPT_NAME
/index.php
REQUEST_URI
/index/user/login.html
QUERY_STRING
s=/index/user/login.html
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_QUERY_STRING
s=/index/user/login.html
REDIRECT_URL
/index/user/login.html
REMOTE_PORT
51504
SCRIPT_FILENAME
/www/wwwroot/yili2.heiwangke.net/public/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/yili2.heiwangke.net/public
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
/www/wwwroot/yili2.heiwangke.net/public
REMOTE_ADDR
44.222.104.206
SERVER_PORT
80
SERVER_ADDR
172.31.83.242
SERVER_NAME
yili2.heiwangke.net
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
<address>Apache Server at yili2.heiwangke.net Port 80</address>
LD_LIBRARY_PATH
/www/server/apache/lib
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_CONNECTION
Keep-Alive
HTTP_HOST
yili2.heiwangke.net
HTTP_ACCEPT_ENCODING
br,gzip
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
proxy-nokeepalive
1
REDIRECT_STATUS
200
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1716589129.5701
REQUEST_TIME
1716589129
PATH_INFO
/index/user/login.html
Environment Variables
empty

ThinkPHP Constants

url
/index/user/login.html
ref
Resource
ent
CCBot/2.0 (https://commoncrawl.org/faq/)
site
https://web.configs.im
road
/?road=yili2.heiwangke.net/index/user/login.html&der=CCBot/2.0 (https://commoncrawl.org/faq/)
regs
@Baidu|Sogou|Yisou|Haosou|Spider|bot|Sm.cn@i
area
false
APP_PATH
/www/wwwroot/yili2.heiwangke.net/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1716589136.3657
THINK_START_MEM
399640
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/yili2.heiwangke.net/thinkphp/
LIB_PATH
/www/wwwroot/yili2.heiwangke.net/thinkphp/library/
CORE_PATH
/www/wwwroot/yili2.heiwangke.net/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/yili2.heiwangke.net/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/yili2.heiwangke.net/
EXTEND_PATH
/www/wwwroot/yili2.heiwangke.net/extend/
VENDOR_PATH
/www/wwwroot/yili2.heiwangke.net/vendor/
RUNTIME_PATH
/www/wwwroot/yili2.heiwangke.net/runtime/
LOG_PATH
/www/wwwroot/yili2.heiwangke.net/runtime/log/
CACHE_PATH
/www/wwwroot/yili2.heiwangke.net/runtime/cache/
TEMP_PATH
/www/wwwroot/yili2.heiwangke.net/runtime/temp/
CONF_PATH
/www/wwwroot/yili2.heiwangke.net/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
ADDON_PATH
/www/wwwroot/yili2.heiwangke.net/addons/