Home > Article > Backend Development > Session is invalid across pages, I’m crazy
In Windows environment, enter the correct user name to log in, the password prompt is successful, and then prepare to jump to the post-login page, but still cannot enter, and is still on the login page itself.
It doesn’t work even if you add it to the shopping cart, it’s annoying that you can’t even use session
The driver of the session is redis. I thought it was a problem with redis. Changing the driver to cache didn’t work either
I saw that my colleagues used docker, and the Linux environment is completely normal.
Paste my session settings in phpinfo below
session
Session Support enabled
Registered save handlers files user memcache
Registered serializer handlers php php_binary wddx
Directive Local Value Master Value
session.auto_start Off Off
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 5 5
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path E:\UPUPW_NP5.4\temp E:\UPUPW_NP5.4\temp
session.serialize_handler php php
session.upload_progress.cleanup On On
session.upload_progress.enabled On On
session.upload_progress.freq 1% 1%
session.upload_progress.min_freq 1 1
session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix upload_progress_ upload_progress_
session.use_cookies On On
session.use_only_cookies On On
session.use_trans_sid 1 1
有牛人指导一下吗?
In Windows environment, enter the correct user name to log in, the password prompt is successful, and then prepare to jump to the post-login page, but still cannot enter, and is still on the login page itself.
It doesn’t work even if you add it to the shopping cart, it’s annoying that you can’t even use session
The driver of the session is redis. I thought it was a problem with redis. Changing the driver to cache didn’t work either
I saw that my colleagues used docker, and the Linux environment is completely normal.
Paste my session settings in phpinfo below
session
Session Support enabled
Registered save handlers files user memcache
Registered serializer handlers php php_binary wddx
Directive Local Value Master Value
session.auto_start Off Off
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 5 5
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path E:\UPUPW_NP5.4\temp E:\UPUPW_NP5.4\temp
session.serialize_handler php php
session.upload_progress.cleanup On On
session.upload_progress.enabled On On
session.upload_progress.freq 1% 1%
session.upload_progress.min_freq 1 1
session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix upload_progress_ upload_progress_
session.use_cookies On On
session.use_only_cookies On On
session.use_trans_sid 1 1
有牛人指导一下吗?
You might as well post the code and have a look
Cross-domain? It’s best to post the code
Maybe the key is wrong →_→
session_start()
???
If it were me, I would check the network in the browser to see if the session value failed to be written or transferred.
Is it a cross-domain problem? I have encountered this problem before