Solution to invalid php session: 1. Modify the address of "session_save_path"; 2. Find the temp folder on the computer and modify the permissions; 3. Restart IIS to make the modification effective.
The operating environment of this article: Windows 2008 system, PHP version 7.1, DELL G3 computer
What should I do if the php session fails?
Solution to session unavailability in php
## Recently, because I have just come into contact with PHP, the code previously tested on the cloud server needs to be moved to the new server (version Windows 2008 server). The PHP version is 5.5.12. It turns out that the session function in the original PHP code is not available. Later, I checked online that it was due to a problem with the session storage directory in the PHP configuration file on the server. After some tossing, I roughly summarized the entire problem. The following instructions take Windows 2008 server as an example.
##3. Restart IIS to make the changes take effect
Open IIS in the server (you can't find this anywhere, you can search online), and restart IIS.
At this point, the setting of session_save_path is complete. Hurry up and try the session function again to see if it works. Hope it helps everyone.
Recommended learning: "
PHP Video TutorialThe above is the detailed content of What to do if php session fails. For more information, please follow other related articles on the PHP Chinese website!

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version
Recommended: Win version, supports code prompts!

Atom editor mac version download
The most popular open source editor

Notepad++7.3.1
Easy-to-use and free code editor

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
