[2] ErrorException in Session.php line 71

session_save_path(): Cannot change save path when headers already sent

  1. if (isset($config['var_session_id']) && isset($_REQUEST[$config['var_session_id']])) {
  2. session_id($_REQUEST[$config['var_session_id']]);
  3. } elseif (isset($config['id']) && !empty($config['id'])) {
  4. session_id($config['id']);
  5. }
  6. if (isset($config['name'])) {
  7. session_name($config['name']);
  8. }
  9. if (isset($config['path'])) {
  10. session_save_path($config['path']);
  11. }
  12. if (isset($config['domain'])) {
  13. ini_set('session.cookie_domain', $config['domain']);
  14. }
  15. if (isset($config['expire'])) {
  16. ini_set('session.gc_maxlifetime', $config['expire']);
  17. ini_set('session.cookie_lifetime', $config['expire']);
  18. }
  19. if (isset($config['secure'])) {

Call Stack

  1. in Session.php line 71
  2. at Error::appError(2, 'session_save_path():...', '/var/www/html/thinkp...', 71, ['config' => ['id' => '', 'var_session_id' => '', 'prefix' => 'think', ...], 'isDoStart' => true])
  3. at session_save_path('/var/www/html/runtim...') in Session.php line 71
  4. at Session::init() in Session.php line 119
  5. at Session::boot() in Session.php line 163
  6. at Session::get('user_id') in HomeBase.php line 138
  7. at HomeBase->getUser() in HomeBase.php line 22
  8. at HomeBase->_initialize() in Controller.php line 56
  9. at Controller->__construct(object(Request))
  10. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 243
  11. at App::invokeClass('app\index\controller...') in Loader.php line 420
  12. at Loader::controller('news', 'controller', false, 'Error') in App.php line 372
  13. at App::module([null, 'news', 'detail'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 130
  14. at App::run() in start.php line 18
  15. at require('/var/www/html/thinkp...') in index.php line 41

Exception Datas

Error Context
config { "id": "", "var_session_id": "", "prefix": "think", "type": "", "expire": 2592000, "path": "\/var\/www\/html\/runtime\/session", "auto_start": true }
isDoStart true

Environment Variables

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

Server/Request Data

PHP_EXTRA_CONFIGURE_ARGS
--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
HOSTNAME
7f02a9ca6090
PHP_INI_DIR
/usr/local/etc/php
HOME
/var/www
PHP_LDFLAGS
-Wl,-O1 -Wl,--hash-style=both -pie
PHP_CFLAGS
-fstack-protector-strong -fpic -fpie -O2
PHP_MD5
PHP_VERSION
7.2.10
GPG_KEYS
1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F
PHP_CPPFLAGS
-fstack-protector-strong -fpic -fpie -O2
PHP_ASC_URL
https://secure.php.net/get/php-7.2.10.tar.xz.asc/from/this/mirror
PHP_URL
https://secure.php.net/get/php-7.2.10.tar.xz/from/this/mirror
TERM
xterm
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PHPIZE_DEPS
autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c
PWD
/var/www/html
PHP_SHA256
01c2154a3a8e3c0818acbdbc1a956832c828a0380ce6d1d14fea495ea21804f0
TZ
Asia/Shanghai
USER
www-data
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/)
HTTP_CONNECTION
close
HTTP_X_SCHEME
https
HTTP_X_REAL_IP
3.239.242.55
HTTP_HOST
www.fengli.com
REDIRECT_STATUS
200
SERVER_NAME
localhost
SERVER_PORT
80
SERVER_ADDR
172.20.0.5
REMOTE_PORT
39532
REMOTE_ADDR
172.20.0.1
SERVER_SOFTWARE
nginx/1.15.5
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.0
DOCUMENT_ROOT
/var/www/html
DOCUMENT_URI
/index.php
REQUEST_URI
/news/23361630.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/news/23361630.html
SCRIPT_FILENAME
/var/www/html//index.php
PATH_TRANSLATED
/var/www/html
PATH_INFO
/news/23361630.html
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1611208019.1294
REQUEST_TIME
1611208019
argv
[ "s=\/news\/23361630.html" ]
argc
1

Environment Variables

PHP_EXTRA_CONFIGURE_ARGS
--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
HOSTNAME
7f02a9ca6090
PHP_INI_DIR
/usr/local/etc/php
HOME
/var/www
PHP_LDFLAGS
-Wl,-O1 -Wl,--hash-style=both -pie
PHP_CFLAGS
-fstack-protector-strong -fpic -fpie -O2
PHP_MD5
PHP_VERSION
7.2.10
GPG_KEYS
1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F
PHP_CPPFLAGS
-fstack-protector-strong -fpic -fpie -O2
PHP_ASC_URL
https://secure.php.net/get/php-7.2.10.tar.xz.asc/from/this/mirror
PHP_URL
https://secure.php.net/get/php-7.2.10.tar.xz/from/this/mirror
TERM
xterm
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PHPIZE_DEPS
autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c
PWD
/var/www/html
PHP_SHA256
01c2154a3a8e3c0818acbdbc1a956832c828a0380ce6d1d14fea495ea21804f0
TZ
Asia/Shanghai
USER
www-data
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/)
HTTP_CONNECTION
close
HTTP_X_SCHEME
https
HTTP_X_REAL_IP
3.239.242.55
HTTP_HOST
www.fengli.com
REDIRECT_STATUS
200
SERVER_NAME
localhost
SERVER_PORT
80
SERVER_ADDR
172.20.0.5
REMOTE_PORT
39532
REMOTE_ADDR
172.20.0.1
SERVER_SOFTWARE
nginx/1.15.5
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.0
DOCUMENT_ROOT
/var/www/html
DOCUMENT_URI
/index.php
REQUEST_URI
/news/23361630.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/news/23361630.html
SCRIPT_FILENAME
/var/www/html//index.php
PATH_TRANSLATED
/var/www/html
PATH_INFO
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1611208019.1294
REQUEST_TIME
1611208019
argv
[ "s=\/news\/23361630.html" ]
argc
1

ThinkPHP Constants

APP_PATH
/var/www/html/application/
SESSION_PATH
/var/www/html/runtime/session
THINK_VERSION
5.0.7
THINK_START_TIME
1611208019.1299
THINK_START_MEM
396536
EXT
.php
DS
/
THINK_PATH
/var/www/html/thinkphp/
LIB_PATH
/var/www/html/thinkphp/library/
CORE_PATH
/var/www/html/thinkphp/library/think/
TRAIT_PATH
/var/www/html/thinkphp/library/traits/
ROOT_PATH
/var/www/html/
EXTEND_PATH
/var/www/html/extend/
VENDOR_PATH
/var/www/html/vendor/
RUNTIME_PATH
/var/www/html/runtime/
LOG_PATH
/var/www/html/runtime/log/
CACHE_PATH
/var/www/html/runtime/cache/
TEMP_PATH
/var/www/html/runtime/temp/
CONF_PATH
/var/www/html/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false