Reading files from Win 2003 Server

Reading files from Win 2003 Server

am 10.10.2007 22:57:27 von Alexis

Hi,

I know this may not be relevant to this list but I tried the General
list and got no reply.

I have a script located on an Ubuntu box and I am trying to read
files located on a Win 2003 Server.

I have 'mounted', if that's the right term to use, a connection from
Ubuntu to Server 2003 and can read the files fine via the desktop, etc.

If the Win Server name is say 'WinServer' and the shared directory I
want to read from on it is called say 'SharedDirectory' and the user
name is 'User', I notice the reference to that folder on the Ubuntu
desktop is as follows:

smb://WinServer%3BUser@WinServer/SharedDirectory



But I am at a loss as to how I should refer to the path for this
connection within my PHP script. Any help would be most appreciated.

If it's any additional help, I would be using the connection to read
files only, and not add/edit/delete them.

Thanks
Alexis

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Reading files from Win 2003 Server

am 11.10.2007 07:26:01 von Gustav Wiberg

Hi!

I haven't managed to use UNC-pat \\SERVER\computer... etc...
with PHP

But it's might be possible to do some network-mapping - a letter with the
directory? and then access the mapping-letter through PHP?

Best regards
/Gustav Wiberg

----- Original Message -----
From: "Alexis"
To:
Sent: Wednesday, October 10, 2007 10:57 PM
Subject: [PHP-WIN] Reading files from Win 2003 Server


> Hi,
>
> I know this may not be relevant to this list but I tried the General list
> and got no reply.
>
> I have a script located on an Ubuntu box and I am trying to read
> files located on a Win 2003 Server.
>
> I have 'mounted', if that's the right term to use, a connection from
> Ubuntu to Server 2003 and can read the files fine via the desktop, etc.
>
> If the Win Server name is say 'WinServer' and the shared directory I
> want to read from on it is called say 'SharedDirectory' and the user
> name is 'User', I notice the reference to that folder on the Ubuntu
> desktop is as follows:
>
> smb://WinServer%3BUser@WinServer/SharedDirectory
>
>
>
> But I am at a loss as to how I should refer to the path for this
> connection within my PHP script. Any help would be most appreciated.
>
> If it's any additional help, I would be using the connection to read
> files only, and not add/edit/delete them.
>
> Thanks
> Alexis
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Reading files from Win 2003 Server

am 11.10.2007 13:06:34 von John Mertic

You're going to want to mount the directory at the command line, something like

smbmount //server/share /localdir -o username=user,password=pass,uid=500,gid=500

Also be sure that /localdir is readable by the www-user account.

John

On 10/10/07, Alexis wrote:
> Hi,
>
> I know this may not be relevant to this list but I tried the General
> list and got no reply.
>
> I have a script located on an Ubuntu box and I am trying to read
> files located on a Win 2003 Server.
>
> I have 'mounted', if that's the right term to use, a connection from
> Ubuntu to Server 2003 and can read the files fine via the desktop, etc.
>
> If the Win Server name is say 'WinServer' and the shared directory I
> want to read from on it is called say 'SharedDirectory' and the user
> name is 'User', I notice the reference to that folder on the Ubuntu
> desktop is as follows:
>
> smb://WinServer%3BUser@WinServer/SharedDirectory
>
>
>
> But I am at a loss as to how I should refer to the path for this
> connection within my PHP script. Any help would be most appreciated.
>
> If it's any additional help, I would be using the connection to read
> files only, and not add/edit/delete them.
>
> Thanks
> Alexis
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
John Mertic
jmertic@gmail.com
http://jmertic.wordpress.com

"Explaining a joke is like dissecting a frog: you understand it
better, but the frog dies
in the process." --Mark Twain

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php