using system() cmds on different servers.

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
khangol
Forum Newbie
Posts: 2
Joined: Mon Jul 19, 2010 10:37 am

using system() cmds on different servers.

Post by khangol »

I want to know if it is possible to use system() to run shell commands on another server on the network. IE i want to execute DIR on \\serverA\files and also on \\serverB\files. So far when i try

$last_line = system('dir \\serverA\files', $retval);

it does not return any results.

Is there a workaround for this? If I can't get this to to work I may try Perl.

ANY help much appreciated, thank you!

*** if you are interested in why I am doing this read below.

I post links of ISO files located on various servers on my company network and these links are posted online for my co-workers to use. However, these links only work in IE and not FF or Chrome. My workaround for this will be to move the files to a temporary folder on the hosting server when the link is clicked, and the file can then be downloaded from there.
Gargoyle
Forum Contributor
Posts: 130
Joined: Wed Jul 14, 2010 12:25 am

Re: using system() cmds on different servers.

Post by Gargoyle »

one of the great things about linux is that everything can be mapped to a directory. simply map the folder on the network machine to a folder on the local machine.
khangol
Forum Newbie
Posts: 2
Joined: Mon Jul 19, 2010 10:37 am

Re: using system() cmds on different servers.

Post by khangol »

Gargoyle wrote:one of the great things about linux is that everything can be mapped to a directory. simply map the folder on the network machine to a folder on the local machine.
All of the machines are windows, is there a workaround for this?
Gargoyle
Forum Contributor
Posts: 130
Joined: Wed Jul 14, 2010 12:25 am

Re: using system() cmds on different servers.

Post by Gargoyle »

there are very, very few professional (L)AMP developers who work with windows, so you're pretty much on your own there, sorry.
Post Reply