Question

I am having the following difficulties: Three servers A,B,C : A,B in the same network domain; C in another. PHP scripts executing on server A write to a shared folder on server B. The same scripts executing on server C fail to write to server B.

PHP looks something like this:

oject->Output('\\\\serverB\\sharedfolder\\file.dummy');

Is there any way I can make this script work elegantly on server C?

When I remote-desktop to server C and want to see the contents of \\serverB\sharedfolder, a login prompt pops up and asks for a user name and password. This I can provide and subsequently access the shared folder on server B. But how could I do this from a PHP script? Is it possible?

Was it helpful?

Solution

I think the easiest option with security in mind would be to write the content from server C in to a socket where server A,B reside and have an additional script which will save the content written from the socket to your shared folder.....

http://www.php.net/manual/en/function.fsockopen.php

OTHER TIPS

The formats are:

  • UNC — \\servername\sharename%username:password
  • URL — smb://[[domain;]username[:password]@]server[/share[/path]]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top