Try running apache not as a service. If that works you know it's a
permissions thing.

On Tue, 8 Jan 2002 16:01:39 -0500, nicole wrote:
>I am running Apache (as a service) on Win2k. LocalSystem is the
>logon for that. I experimented and changed it. Stopped the apache
>service, then couldn't start it back again. SO i put it back to the
>LocalSystem and it started back again.
>
>On the computer with the files I am trying to access, I added a
>NETWORK user with full access (there is already an EVERYBODY with
>full access). So I dont see how the NETWORK would make anymore or
>less difference - I don't know.
>
>Other than that, I am clueless and nothing seems to work. I know my
>code works, because it works when testing on a local drive (eg. C:).
>So, something with the permissions, perhaps, I am not doing
>correctly.
>
>Someone suggested I needed to give access to the script and  httpd
>trying to access the share.
>
>Help. ;)
>
>anyone actually have any luck getting this scenario to work?
>(accessing files over a network - not internet).
>
>Thanks again!
>
>NIcole Amashta
>www.aeontrek.com
>
>
> ----- Original Message -----
> From: Christoph Grottolo
> Newsgroups: php.windows
> To: [EMAIL PROTECTED]
> Sent: Tuesday, January 08, 2002 2:53 PM
> Subject: Re: [PHP-WIN] Can I access files from a mapped drive or
>over the network?
>
>
> Under what account does your webserver run? Does this account have
> appropriate permissions on the share?
> It only makes sense to use drive letter mappings for remote shares
>if your
> server runs on a worktation. On a production server you don't
>usually have
> access to mapped drives because no user is logged on.
>
> PHP4 can only access network shares since 4.10, before UNC-Style
>paths did
> not work. However, something with the treatment of backslashes
>still doesn't
> seem to work under certain circumstances. We've made better
>experiences
> using forward slashes like on unix. You can do that in the scripts
>but also
> in php.ini.
>
> If you're running IIS you should check 'check that file exists' in
>the
> administration panel where you enter the mapping from .php to
>php.exe. Then
> IIS will check the permissions for PHP. Sometimes this can help.
>Make shure
> the IUSER_YOURMACHINE account has the appropriate permissions or
>change it
> to a network account.
>
> If you're running Apache, check in Control Panel -> Services under
>what
> account it runs. Usually its local\system. You should change that
>to a
> network account.
>
> Christoph
>
>
>
> "Nicole Amashta" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> | The OS is Win2k. The files I want to access are flat text files
> (.txt,.csv).
> | This is NOT a DATABASE related question. This is strictly flat
>files.
> |
> | I have the shared directories mapped to the computer with a
>drive letter
> of
> | R. So, in theory, according to what one said, I should be able
>to access
> and
> | list the directories and files on that shared directory. Well, I
>already
> | tried this yesterday and it's not working. I used as the path:
>R:\\data as
> | the path. I escaped the backslash appropriately. Still, no luck.
>However,
> | when I want to list the contents of the C drive, or any local
>partition,
> | this works.  SO, why can't I access the mapped drive ( R: ) ?
> |
> | * Originally I tried accessing the data by the network name,
>such as:
> | \\ftpserver\data  as $path = "\\\\ftpserver\\data";   This did
>not work
> | either.
> |
> | Here is code that I am using to test this:
> | <snip>
> | <?
> | include("../incs/FileSystem.inc");         // a wrapper class
>for the php
> | file and dir functions
> |
> | $path = "R:\\Data\\JAU\\Sites";     // this is the mapped
>(shared) drive
> | that resides on another computer.
> |
> | $fs = new FileSystem(); // this is an object I wrote that wraps
>all the
> file
> | and directory functions
> |
> | if ( $list = $fs->getList($path) )   // getList() returns an
>array of the
> | files and dirs found in $path (uses opendir )
> | {
> |  $size = count($list);
> |  if ( $size > 0 )
> |  {
> |    for($i=0;$i<$size;$i++)
> |    {
> |      $fname  =  $list[$i];
> |      echo "$fname <br>";      // just print out; this is just
>testing
> |    }
> |  }
> |  else
> |  {
> |   echo "no files";
> |  }
> | }
> | else
> | {
> |   echo "error listing files in: $path";
> | }
> | ?>
> | </snip>
> |
> | Any ideas would be greatly appreciated!
> |
> | Thanks!
> | Nicole Amashta
> | www.aeontrek.com
> |
> | "B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
> | 27E647E5629ED211BF78009027289C6303C1B5E7@mail1">news:27E647E5629ED211BF78009027289C6303C1B5E7@mail1...
> | > >            I need to access data files residing on  a
>different
> computer
> | > in
> | > >the same network as the computer running the php scripts. Is
>this
> | possible?
> | > >I can't find any documentation on this and I need to figure
>this out
> | ASAP,
> | > >as in today.
> | > >
> | > >Once I access the files, I need to be able to read from them
>Is this
> | > >possible, and how??
> | > >
> | > >Please help. Thank you!! ;)
> | >
> | > And the type of files you want to share is? And these files
>recedes on
> | what?
> | > File system, DB, or? And the platform you working on is?
>Anyhow:
> | >
> | > If assume we are talking about regular flat files and you are
>using NT.
> | Then
> | > why not try to make a share? Then you can access the files
>just as any
> | > normal file receding in the file system.
> | >
> | > Syntax for net share:
> | >
> | > [d:\vc98\include]net help share
> | > The syntax of this command is:
> | >
> | >
> | > NET SHARE sharename
> | >           sharename=drive:path [/USERS:number | /UNLIMITED]
> | >                                [/REMARK:"text"]
> | >           sharename [/USERS:number | /UNLIMITED]
> | >                     [/REMARK:"text"]
> | >           {sharename | devicename | drive:path} /DELETE
> | >
> | > NET SHARE makes a server's resources available to network
>users. When
> | > used without options, it lists information about all resources
>being
> | > shared on the computer. For each resource, Windows NT reports
>the
> | > devicename(s) or pathname(s) and a descriptive comment
>associated with
> it.
> | >
> | > sharename          Is the network name of the shared resource.
>Type
> | >                    NET SHARE with a sharename only to display
> information
> | >                    about that share.
> | > drive:path         Specifies the absolute path of the
>directory to
> | >                    be shared.
> | > /USERS:number      Sets the maximum number of users who can
> | >                    simultaneously access the shared resource.
> | > /UNLIMITED         Specifies an unlimited number of users can
> | >                    simultaneously access the shared resource
> | > /REMARK:"text"     Adds a descriptive comment about the
>resource.
> | >                    Enclose the text in quotation marks.
> | > devicename         Is one or more printers (LPT1: through
>LPT9:)
> | >                    shared by sharename.
> | > /DELETE            Stops sharing the resource.
> | >
> | > NET HELP command | MORE displays Help one screen at a time.
> | >
> | > [d:\vc98\include]
> |
> |
>
>
>




--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to