Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if the session failure of php

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "how to do the session failure of php". In the daily operation, I believe that many people have doubts about how to do the session failure of php. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubt of "how to do the session failure of php". Next, please follow the editor to study!

This article operating environment: Windows 2008 system, PHP7.1 version, DELL G3 computer

What if php session fails?

Recently, due to the recent contact with php, the code tested on the CVM needs to be moved to a new server (version Windows 2008 server). The php version is 5.5.12. As a result, it is found that the session feature in the original php code is not available. Later, I checked on the Internet because of the problem of the session storage directory in the php configuration file on the server. After some twists and turns, I probably summed up the whole problem. The following instructions

Windows 2008 server was taken as an example.

First, modify the address of session_save_path

Session_save_path is the directory where session files are stored. If the directory is invalid or the file does not have write permission, session will not be available.

First open the installation address of php on the server and open the php.ini configuration file in it. Then ctrl+F searches the place where session_save_path is found, first check whether the following storage directory is a valid directory path, and if it is not valid, modify it to a valid folder directory, you can create a new directory and create a new folder on the actual disk. The path I modified myself is the directory of c:/Windows/Temp.

Second, modify permissions

The storage directory that has been newly created or modified in the previous step is not feasible if the folder does not have write permission. Then we also need to modify the permissions.

Find the folder on your computer, right-click Properties-Security-Select Users- Edit-tick the write permissions.

Third, restart IIS to make the changes take effect

Open the IIS in the server (you can't find where to search on the Internet) and restart IIS.

At this point, the study on "what to do with the session failure of php" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report