[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...', '/home2/goodlap1/publ...', 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 164
  6. at Session::get('admin_info') in common.php line 20
  7. at is_admin_login() in Base.php line 9
  8. at include('/home2/goodlap1/publ...') in Loader.php line 564
  9. at think\__include_file('/home2/goodlap1/publ...') in Loader.php line 58
  10. at Loader::autoload('app\admin\controller...')
  11. at spl_autoload_call('app\admin\controller...') in Index.php line 6
  12. at include('/home2/goodlap1/publ...') in Loader.php line 564
  13. at think\__include_file('/home2/goodlap1/publ...') in Loader.php line 58
  14. at Loader::autoload('app\admin\controller...')
  15. at spl_autoload_call('app\admin\controller...')
  16. at class_exists('app\admin\controller...') in Loader.php line 419
  17. at Loader::controller('index', 'controller', false, 'Error') in App.php line 388
  18. at App::module(['', null, null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 296
  19. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 124
  20. at App::run() in start.php line 18
  21. at require('/home2/goodlap1/publ...') in index.php line 26

Exception Datas

Error Context
config { "id": "", "var_session_id": "", "prefix": "think", "type": "", "auto_start": true }
isDoStart true

Environment Variables

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

Server/Request Data

LSPHP_ENABLE_USER_INI
on
PATH
/usr/local/bin:/usr/bin:/bin
TEMP
/tmp
TMP
/tmp
TMPDIR
/tmp
PWD
/
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
gzip, br, zstd, deflate
HTTP_CONNECTION
CONTENT_LENGTH
0
HTTP_HOST
saylaptop.com
HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_X_FORWARDED_FOR
3.144.18.59
HTTP_X_REAL_IP
3.144.18.59
HTTP_X_EIG_ORIGIN
162.241.173.229
HTTP_X_CACHE_REQ
1
HTTP_X_HTTPS
1
UNIQUE_ID
Z2kIJxtIUHq144PXu-NYFQAAABY
QS_SrvConn
39
QS_AllConn
109
QS_ConnectionId
173493661564912222276142
no-proxy
1
SCRIPT_URL
/
SCRIPT_URI
https://saylaptop.com/
HTTPS
on
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
saylaptop.com
SERVER_ADDR
162.241.173.229
SERVER_PORT
443
REMOTE_ADDR
3.144.18.59
DOCUMENT_ROOT
/home2/goodlap1/public_html/saylaptop.com
REQUEST_SCHEME
https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/home2/goodlap1/public_html/saylaptop.com
SERVER_ADMIN
webmaster@saylaptop.goodlaptopaccessory.com
SCRIPT_FILENAME
/home2/goodlap1/public_html/saylaptop.com/index.php
REMOTE_PORT
31582
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1734936616.1866
REQUEST_TIME
1734936616
argv
[]
argc
0
Environment Variables
empty

ThinkPHP Constants

stream_context_create
1
file_put_contents
1
file_get_contents
1
APP_PATH
/home2/goodlap1/public_html/saylaptop.com/application/
THINK_VERSION
5.0.11
THINK_START_TIME
1734936616.2035
THINK_START_MEM
432864
EXT
.php
DS
/
THINK_PATH
/home2/goodlap1/public_html/saylaptop.com/thinkphp/
LIB_PATH
/home2/goodlap1/public_html/saylaptop.com/thinkphp/library/
CORE_PATH
/home2/goodlap1/public_html/saylaptop.com/thinkphp/library/think/
TRAIT_PATH
/home2/goodlap1/public_html/saylaptop.com/thinkphp/library/traits/
ROOT_PATH
/home2/goodlap1/public_html/saylaptop.com/
EXTEND_PATH
/home2/goodlap1/public_html/saylaptop.com/extend/
VENDOR_PATH
/home2/goodlap1/public_html/saylaptop.com/vendor/
RUNTIME_PATH
/home2/goodlap1/public_html/saylaptop.com/runtime/
LOG_PATH
/home2/goodlap1/public_html/saylaptop.com/runtime/log/
CACHE_PATH
/home2/goodlap1/public_html/saylaptop.com/runtime/cache/
TEMP_PATH
/home2/goodlap1/public_html/saylaptop.com/runtime/temp/
CONF_PATH
/home2/goodlap1/public_html/saylaptop.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false