I was previously running iis 8.5 on 2012 R2 and this was all working perfectly.
After moving to a clean install of Server 2016 I ported over the sites from the previous install and everything seemed to work. Except for the one PHP page.
Previously it was configured to grab the contents of a directory by network name (//server/share/folder/). And it had no issues doing this.
It WILL work if I point it at pretty much any local directory.
I'm convinced this is some kind of IIS 10 sand-boxing thing. I made sure that the app pool user had access to the share, I even tried changing the AppPool user to a domain admin account (for testing!). I confirmed that the php-cgi.exe processes that spawned were indeed running as the AppPool user.
I'm kinda stumped at this point. I compared the appconfig and site configs to the ones from the old install and they are pretty much identical.
Anyone else tried to do this and got it working?
(Also side note, I don't have the reputation to create a new tag and an iis-10 tag is now needed IMO.)
Figured it out!
The issue was the open_basedir was set to C:\inetpub
This meant that PHP wasn't allowed to access anything outside of that directory tree. Commenting it out fixed the issue.