Score:0

PHP 8 on IIS 2019: Sometimes Session can not be written

ph flag

From time to time I get the classic "Failed to read session data" error on my application running on php 8, IIS 2019. This is usually associated with a) the directory does not exist b) the permissions are not set. I can rule out both cases.

Sessions are stored in c:/Temp/phpsessions. All read/write permissions are set correctly. Most of the times there is no problem. But if users doesn't log in for a while I get the following warning and the app does not work.

PHP Warning: session_start():open(C:\temp\phpsessions\sess_221kd8pv25fvefq@tnph9fhoss,O_RDWR)failed:Permission denied(13)...

Again, the session_path is set in php.ini, most of the time everything works. I thought maybe the session key in websites cookie does not have a corresponding session file anymore. But that should not generate an error but a new session. What am I missing?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.