When I visited my website today (by thinkphp), I suddenly found that the authentication failed, the Session could not cross pages, and when logging in, it always prompted a verification code error (the verification code was also passed through the Session), and then I realized that it might be Session is invalid. Since the space I rent is in an IIS environment, the Session may be stored in a fixed location, and that location is transparent (unknowable) to me. There may be a problem with it (full or permission issues, etc.), so I decided to change the location where the Session is stored. I found the following solution online and finally got it. The method is as follows:
There are many different ways to modify the session path. For example, you can modify it directly in the tp configuration file, or you can modify it in php.ini. Let’s take a look.
Modifying the session in TP is quite simple, and TP has taken it into consideration for us!
You only need to add:
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 it out. So where is the path saved by Seesion saved in different types of operating systems?
Linux:
/tmp or /var/lib/php/session
Windows:
C:/WINDOWS/Temp
Hope it can be helpful to children’s shoes who encounter the same problem.
Source: http://www.dqiu.net/doc/57e0a85100552

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
