I have a PHP project in Windows Server 2012 & Xampp 1.8.2. I've tried to read some remote HTML content from another Windows Server 2008 with IIS:
$handle = fopen("\\\\SERVER001\\Webdocs\\page\\index.html", 'r');
...but I have this message:
Warning: fopen(\SERVER001\Webdocs\page\index.html): failed to open stream: Permission denied in ...
But if I'm accessing with the file protocol, works fine:
file://///SERVER001/Webdocs/page/index.html
I've added the IP server in the ipv4 address and domain restrictions
option of IIS, I've gotten the same result.
I think is problem of Windows Server 2012 (or apache) because I've tested the same project (localhost) in my PC Windows 7, the same xampp 1.8.2., I've added my IP in the ipv4 address and domain restrictions
in the 2008 Server and fopen()
works without problems and extra configurations. The only difference from the server and my PC is the OS.
What another thing I do to have permission on this server?
Permissions:
I've found the problem:
apache service in netstat running like a local user
The difference between my PC and Windows Server is my Xampp's Control doesn't have the apache service installed. When this is installed, the Apache service running like a local user (not like a user in the active directory domain).
So is necessary asign a domain user in:
Services > Apache > Properties > Log On tab > This account
Restart Apache and works!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With