So we are currently migrating several applications from one server to another. The two major differences between these servers is the OS and PHP versions.
Old Server:
Windows Server 2008 R2
PHP 5.6.0
New Server:
Windows Server 2019
PHP 7.4.3
When I run the site on the new location I get the following output:
Deprecated: Array and string offset access syntax with curly braces is deprecated in E:\****\inc\init.php on line 563
Warning: session_start(): open(C:\Windows\TEMP\sess_bvl7un3mrgaukot1aail1mgvqs, O_RDWR) failed: Permission denied (13) in E:\itwiki\inc\init.php on line 247
Warning: session_start(): Failed to read session data: files (path: ) in E:\****\inc\init.php on line 247
DokuWiki Setup Error
The datadir ('pages') at ./data/pages is not found, isn't accessible or writable. You should check your config and permission settings. Or maybe you want to run the installer?
I know I'm running the development settings, but that's ok for now.
So I think the IIS user needs permission to the C:\Windows\TEMP folder and the .\data folder, but I'm unsure what username IIS uses in Server 2019. Or am I missing something else?
*EDIT*
I figured it out.
In IIS, if you turn off anonymous access and turn on windows based authentication, then the php-cgi.exe will imitate the user's permission to access the wiki's folders and the temp folder as well. So the solution is to add a user or group that will allow the user's imitated access to write files to those directories.