How can I access a file remotely?
How can I access a file remotely?
am 30.07.2007 18:16:32 von Florian Erfurth
Hi everyone,
as a Win-User he has to enter "\\intranet\logons$\wsa01.txt" in explorer in
order to open this file.
Now I'm writing a php-script on freeBSD. I don't have a idea how to access
this file. I already tried following:
fopen("//intranet/logons$/wsa01.txt");
But the file is not found. I think I have to use samba, am I right? But how
should I do that with php.
I'm really new in php and today I write the very first time a php-script. I
already looked in http://www.php-homepage.de/manual/ (by the way, this is a
good manual! :) ).
Thank you very much!
cu Floh
Re: How can I access a file remotely?
am 30.07.2007 18:46:56 von ELINTPimp
On Jul 30, 12:16 pm, Florian Erfurth wrote:
> Hi everyone,
> as a Win-User he has to enter "\\intranet\logons$\wsa01.txt" in explorer in
> order to open this file.
> Now I'm writing a php-script on freeBSD. I don't have a idea how to access
> this file. I already tried following:
> fopen("//intranet/logons$/wsa01.txt");
>
> But the file is not found. I think I have to use samba, am I right? But how
> should I do that with php.
>
> I'm really new in php and today I write the very first time a php-script. I
> already looked inhttp://www.php-homepage.de/manual/(by the way, this is a
> good manual! :) ).
>
> Thank you very much!
> cu Floh
Floh,
If there isn't already a mechanism in place to work between the two
filesystems (Samba, netapp, even FTP), then it isn't going to work.
You need to get this resolved before you even start with PHP. If,
however, you are able to navigate to that directory from your BSD
machine in the command prompt, for example, you're set. In that case,
you need to use the same \'s as windows uses, except you have to
escape them:
\\\\intranet\\logons$\\wsa01.txt
Re: How can I access a file remotely?
am 31.07.2007 03:32:57 von luiheidsgoeroe
On Mon, 30 Jul 2007 18:16:32 +0200, Florian Erfurth
wrote:
> Hi everyone,
> as a Win-User he has to enter "\\intranet\logons$\wsa01.txt" in explorer
> in
> order to open this file.
> Now I'm writing a php-script on freeBSD. I don't have a idea how to
> access
> this file. I already tried following:
> fopen("//intranet/logons$/wsa01.txt");
>
> But the file is not found. I think I have to use samba, am I right? But
> how
> should I do that with php.
>
> I'm really new in php and today I write the very first time a
> php-script. I
> already looked in http://www.php-homepage.de/manual/ (by the way, this
> is a
> good manual! :) ).
Hmmmz, I believe that with a Linux server the easiest thing you can use is
a simple symlink in the local filesystem which points to the mounted SMB
share... Then again, I have never used SMB shares with Linux.
On Windows, Vista has tried to catch up on this, do not know how it
handles shares...
Links about Vista's capabilities
--
Rik Wasmus
Re: How can I access a file remotely?
am 02.08.2007 10:52:23 von Florian Erfurth
ELINTPimp wrote:
> On Jul 30, 12:16 pm, Florian Erfurth wrote:
>> Hi everyone,
>> as a Win-User he has to enter "\\intranet\logons$\wsa01.txt" in explorer
>> in order to open this file.
>> Now I'm writing a php-script on freeBSD. I don't have a idea how to
>> access this file. I already tried following:
>> fopen("//intranet/logons$/wsa01.txt");
>>
>> But the file is not found. I think I have to use samba, am I right? But
>> how should I do that with php.
>>
>> I'm really new in php and today I write the very first time a php-script.
>> I already looked inhttp://www.php-homepage.de/manual/(by the way, this is
>> a good manual! :) ).
>>
>> Thank you very much!
>> cu Floh
>
> If there isn't already a mechanism in place to work between the two
> filesystems (Samba, netapp, even FTP), then it isn't going to work.
> You need to get this resolved before you even start with PHP.
Nope. And my colleague doesn't like to do that "outside" of php-script.
> If, however, you are able to navigate to that directory from your BSD
> machine in the command prompt, for example, you're set. In that case,
> you need to use the same \'s as windows uses, except you have to
> escape them:
>
> \\\\intranet\\logons$\\wsa01.txt
Even that doesn't work. But I've discussed with my colleague and we decided
to use ftp instead of smb.
Thank you very much!
cu Floh
Re: How can I access a file remotely?
am 02.08.2007 12:37:14 von Jerry Stuckle
Florian Erfurth wrote:
> ELINTPimp wrote:
>
>> On Jul 30, 12:16 pm, Florian Erfurth wrote:
>>> Hi everyone,
>>> as a Win-User he has to enter "\\intranet\logons$\wsa01.txt" in explorer
>>> in order to open this file.
>>> Now I'm writing a php-script on freeBSD. I don't have a idea how to
>>> access this file. I already tried following:
>>> fopen("//intranet/logons$/wsa01.txt");
>>>
>>> But the file is not found. I think I have to use samba, am I right? But
>>> how should I do that with php.
>>>
>>> I'm really new in php and today I write the very first time a php-script.
>>> I already looked inhttp://www.php-homepage.de/manual/(by the way, this is
>>> a good manual! :) ).
>>>
>>> Thank you very much!
>>> cu Floh
>> If there isn't already a mechanism in place to work between the two
>> filesystems (Samba, netapp, even FTP), then it isn't going to work.
>> You need to get this resolved before you even start with PHP.
> Nope. And my colleague doesn't like to do that "outside" of php-script.
>
That wasn't his point. His point was, if there isn't a way to access
the file without PHP, PHP can't "magically" create a way to access it.
PHP can only automate what can be done manually.
>> If, however, you are able to navigate to that directory from your BSD
>> machine in the command prompt, for example, you're set. In that case,
>> you need to use the same \'s as windows uses, except you have to
>> escape them:
>>
>> \\\\intranet\\logons$\\wsa01.txt
> Even that doesn't work. But I've discussed with my colleague and we decided
> to use ftp instead of smb.
>
I hope you're not trying to do this "live" every time the web page is
loaded...
> Thank you very much!
> cu Floh
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: How can I access a file remotely?
am 02.08.2007 17:08:36 von Florian Erfurth
Jerry Stuckle wrote:
> Florian Erfurth wrote:
>> ELINTPimp wrote:
>>
>>> On Jul 30, 12:16 pm, Florian Erfurth wrote:
>>>> But the file is not found. I think I have to use samba, am I right? But
>>>> how should I do that with php.
>>>>
>>>> I'm really new in php and today I write the very first time a
>>>> php-script. I already looked inhttp://www.php-homepage.de/manual/(by
>>>> the way, this is a good manual! :) ).
>>>>
>>>> Thank you very much!
>>>> cu Floh
>>> If there isn't already a mechanism in place to work between the two
>>> filesystems (Samba, netapp, even FTP), then it isn't going to work.
>>> You need to get this resolved before you even start with PHP.
>> Nope. And my colleague doesn't like to do that "outside" of php-script.
>>
>
> That wasn't his point. His point was, if there isn't a way to access
> the file without PHP, PHP can't "magically" create a way to access it.
> PHP can only automate what can be done manually.
Ah... now I understand that. But what about the following code?
http://smbwebclient.sourceforge.net/smbwebclient.phps So it's possible! (I
think so)
>> Even that doesn't work. But I've discussed with my colleague and we
>> decided to use ftp instead of smb.
>>
>
> I hope you're not trying to do this "live" every time the web page is
> loaded...
I know... it's way to slow so we redecided to use mySQL instead.
Thank you.
Floh
Re: How can I access a file remotely?
am 02.08.2007 18:58:55 von Jerry Stuckle
Florian Erfurth wrote:
> Jerry Stuckle wrote:
>
>> Florian Erfurth wrote:
>>> ELINTPimp wrote:
>>>
>>>> On Jul 30, 12:16 pm, Florian Erfurth wrote:
>>>>> But the file is not found. I think I have to use samba, am I right? But
>>>>> how should I do that with php.
>>>>>
>>>>> I'm really new in php and today I write the very first time a
>>>>> php-script. I already looked inhttp://www.php-homepage.de/manual/(by
>>>>> the way, this is a good manual! :) ).
>>>>>
>>>>> Thank you very much!
>>>>> cu Floh
>>>> If there isn't already a mechanism in place to work between the two
>>>> filesystems (Samba, netapp, even FTP), then it isn't going to work.
>>>> You need to get this resolved before you even start with PHP.
>>> Nope. And my colleague doesn't like to do that "outside" of php-script.
>>>
>> That wasn't his point. His point was, if there isn't a way to access
>> the file without PHP, PHP can't "magically" create a way to access it.
>> PHP can only automate what can be done manually.
>
> Ah... now I understand that. But what about the following code?
> http://smbwebclient.sourceforge.net/smbwebclient.phps So it's possible! (I
> think so)
>
Sure, that will work - if you install Samba on your server, as Rik
suggested. That provides a way to access the file remotely. PHP will
then be able to access it.
>>> Even that doesn't work. But I've discussed with my colleague and we
>>> decided to use ftp instead of smb.
>>>
>> I hope you're not trying to do this "live" every time the web page is
>> loaded...
> I know... it's way to slow so we redecided to use mySQL instead.
>
FTP wasn't made for live file access :-)
> Thank you.
> Floh
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: How can I access a file remotely?
am 03.08.2007 15:26:09 von Florian Erfurth
Jerry Stuckle wrote:
> Florian Erfurth wrote:
>> Jerry Stuckle wrote:
>>
>>> Florian Erfurth wrote:
>>>> ELINTPimp wrote:
>>>>
>>>>> If there isn't already a mechanism in place to work between the two
>>>>> filesystems (Samba, netapp, even FTP), then it isn't going to work.
>>>>> You need to get this resolved before you even start with PHP.
>>>> Nope. And my colleague doesn't like to do that "outside" of php-script.
>>>>
>>> That wasn't his point. His point was, if there isn't a way to access
>>> the file without PHP, PHP can't "magically" create a way to access it.
>>> PHP can only automate what can be done manually.
>>
>> Ah... now I understand that. But what about the following code?
>> http://smbwebclient.sourceforge.net/smbwebclient.phps So it's possible!
>> (I think so)
>>
>
> Sure, that will work - if you install Samba on your server, as Rik
> suggested. That provides a way to access the file remotely. PHP will
> then be able to access it.
Of course samba is installed on server. But unfortunatelly the PHP-script
(smbwebclient.php) is huge, so I don't have idea how to access a file (I
only want to read the content, not more).
cu Floh
Re: How can I access a file remotely?
am 03.08.2007 20:06:45 von Jerry Stuckle
Florian Erfurth wrote:
> Jerry Stuckle wrote:
>
>> Florian Erfurth wrote:
>>> Jerry Stuckle wrote:
>>>
>>>> Florian Erfurth wrote:
>>>>> ELINTPimp wrote:
>>>>>
>>>>>> If there isn't already a mechanism in place to work between the two
>>>>>> filesystems (Samba, netapp, even FTP), then it isn't going to work.
>>>>>> You need to get this resolved before you even start with PHP.
>>>>> Nope. And my colleague doesn't like to do that "outside" of php-script.
>>>>>
>>>> That wasn't his point. His point was, if there isn't a way to access
>>>> the file without PHP, PHP can't "magically" create a way to access it.
>>>> PHP can only automate what can be done manually.
>>> Ah... now I understand that. But what about the following code?
>>> http://smbwebclient.sourceforge.net/smbwebclient.phps So it's possible!
>>> (I think so)
>>>
>> Sure, that will work - if you install Samba on your server, as Rik
>> suggested. That provides a way to access the file remotely. PHP will
>> then be able to access it.
> Of course samba is installed on server. But unfortunatelly the PHP-script
> (smbwebclient.php) is huge, so I don't have idea how to access a file (I
> only want to read the content, not more).
>
> cu Floh
Well, is Samba is installed, can you access the file outside of PHP -
i.e. can you display or edit the file from the server's command line?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================