Read remote folder on the same LAN

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
freeman74
Forum Newbie
Posts: 4
Joined: Mon Jul 19, 2010 5:43 am

Read remote folder on the same LAN

Post by freeman74 »

Hi to all,
this is my 1st message here.
This is my problem: I have an application that read (and open) some wave's files on a remote folder, situated on a server inside the company lan.
This application run on an older Windows2000 and it has no problems.
I've transferred the files on a new machine, wich runs Windows 2003 Server R2, always inside the lan, but I'm not able to read the remote folder anymore.
PHP version is the same on both machine (old and new) and both are running as isapi module under IIS.
Of course, if I try to open the folder manually trought "run" command (from start menu), everything works fine.
Any suggestion??
Thanks!
Gargoyle
Forum Contributor
Posts: 130
Joined: Wed Jul 14, 2010 12:25 am

Re: Read remote folder on the same LAN

Post by Gargoyle »

are the fopen wrappers activated?

if so, then you are having an IIS issue. get rid of it, if possible.
freeman74
Forum Newbie
Posts: 4
Joined: Mon Jul 19, 2010 5:43 am

Re: Read remote folder on the same LAN

Post by freeman74 »

Gragoyle,
thank for your reply.
I've disable the wrappers into the php.ini

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = Off

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = Off

restarted IIS but the problem remains.

this is the simple code:

Code: Select all

$path = "\\\\RemoteServer\\";

var_dump(file_exists($path));
and the result is: bool(false)
Gargoyle
Forum Contributor
Posts: 130
Joined: Wed Jul 14, 2010 12:25 am

Re: Read remote folder on the same LAN

Post by Gargoyle »

are you running in safe mode? if so, try disabling it because of the folder restrictions.

try normal slashes instead of backslashes in your network path.

finally, if I remember right, IIS always runs on a user account, which may not have network privileges. run it as a network user.
freeman74
Forum Newbie
Posts: 4
Joined: Mon Jul 19, 2010 5:43 am

Re: Read remote folder on the same LAN

Post by freeman74 »

Gargoyle wrote:are you running in safe mode? if so, try disabling it because of the folder restrictions.
no, safe mode is disabled
Gargoyle wrote:try normal slashes instead of backslashes in your network path.
tried, nothing happens
Gargoyle wrote:finally, if I remember right, IIS always runs on a user account, which may not have network privileges. run it as a network user.
yes, but is anonymous....i've tried to change as administrator but nothing....
Gargoyle
Forum Contributor
Posts: 130
Joined: Wed Jul 14, 2010 12:25 am

Re: Read remote folder on the same LAN

Post by Gargoyle »

your problem is almost certainly with IIS then. I don't use IIS (for good reasons) so I can't be of further assistance here and this may be the wrong forum to get help on this.
freeman74
Forum Newbie
Posts: 4
Joined: Mon Jul 19, 2010 5:43 am

Re: Read remote folder on the same LAN

Post by freeman74 »

ok, thanks the same...
Post Reply