Re: file_exists() with Windows share
- From: "Steve" <googlespam@xxxxxxxxxxxxx>
- Date: 28 Nov 2005 08:42:30 -0800
> Running PHP5 with IIS on a Win2K Server
You can get the same problem with PHP 4.x, but for different reasons.
> whenever I try file_exists() on a file in a windows share on another
> server I get a response of False - I can't open the file or do anything
> with it. I'm sure the filename/path is Ok
For PHP 4.x, all file operations assume the local file system
(effectively, "file://" is prepended to the given filename before
operating on it.) The workaround is to use drive letters instead.
For PHP 5.x, you can work with UNC shares BUT there are caveats: (1)
from the manual "...this function returns FALSE for files inaccessible
due to safe mode restrictions." and (2), note this comment about
running under domain accounts:
<http://aspn.activestate.com/ASPN/Mail/Message/phpdoc/1183917> Check
permissions for the folder and file are appropriate for the web server
account.
---
Steve
.
- Follow-Ups:
- Re: file_exists() with Windows share
- From: Chung Leong
- Re: file_exists() with Windows share
- References:
- file_exists() with Windows share
- From: Alan
- file_exists() with Windows share
- Prev by Date: Re: Very Weird Behavior
- Next by Date: Re: file_exists() with Windows share
- Previous by thread: Re: file_exists() with Windows share
- Next by thread: Re: file_exists() with Windows share
- Index(es):
Relevant Pages
|