I have this web system in PHP (5.6) and is running in IIS 8.5 Windows Server 2012 R2. What I wanted to do is list all the files in a directory. The directory that I'm reading is a mapped network drive of a shared folder of another server (Y:\sharedfolder). When I execute command dir of the network drive, it is not seen by the php code
I have searched here in site and saw a lot of possible solutions but nothing work on my end. I'm not sure I'm doing them correctly. So I'll share my current settings here.
When I ran whoami in CLI, I get "pc_name\administrator". when I execute it in code, I get "iis apppool\cs2".
The mapped network drive (Y:\sharedfolder) is shared to the following:
- Everyone
- SYSTEM
- Administrator (pc_name\Administrator)
- Administrators (pc_name\Administrators)
- IIS_IUSRS (pc_name\IIS_IUSRS)
- CS2 (iis apppool\cs2)
My IIS Settings are the following:
[Authentication]
- Anonymous Authentication (Enabled, Credentials: Application pool identity)
- ASP.NET Impersonation (Disabled)
- Forms Authentication (Disabled)
[Application Pools]
- CS2 (.NET CLR v4.0, Managed pipeline mode: Integrated, Identity: ApplicationPoolIdentity, Load User Profile: True)
- DefaultAppPool (.NET CLR v4.0, Managed pipeline mode: Integrated, Identity: ApplicationPoolIdentity, Load User Profile: True)
[Fast CGI Settings]
- C:\php\php-cgi.exe (Protocol Tcp)
[Sites: CS2]
- Site name: CS2
- Application Pool: CS2
- Physical Path: C:\inetpub\wwwroot\cs2
- Connect as 'administrator'
These are all my settings yet I still couldn't access the Mapped network drive. Is there a missing or incorrect setting in my IIS?