Solution for space session failure: session failure
When I visited my website today (by thinkphp), I suddenly found that my identity verification failed, the Session could not be cross-page, and a verification code error was always prompted during login (the verification code was also passed through the Session ), to realize that the Session may be invalid. Because the space I rented is in the IIS environment, sessions may be stored in a fixed location, which is transparent to me (unknown ), it may have a problem (full or permission problem), so I decided to modify the location where the Session is stored and found the following solution on the Internet to finally solve the problem:
There are many different methods to modify the session path, such as modifying the session path directly in the tp configuration file or modifying the session path in php. ini. Let's take a look at it.
Modifying sessions in TP is quite simple, and TP is also taken into account for us!
You only need to add the following in the project configuration file:
'Session _ options' => array ('path' => 'd:/thinkphp/sessions /')
You can also modify the configuration session. save_path in php. ini to comment out the settings. In this case, where is the path stored by Seesion stored in different operating systems?
Linux:
/Tmp or/var/lib/php/session
Windows:
C:/WINDOWS/Temp
It is expected to help children's shoes with the same problems.
Source: http://www.dqiu.net/doc/57e0a85100552