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
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!