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?