We have a windows master instance that writes data to Linux nodes, currently this is working fine. The PHP files running on windows can use a simple script to write to the linux machine like so:
file_put_contents('\\\\hostname\\share\\testfile.txt', 'testing123');
The linux node has the windows php user stored, and allows the files to be written. However, we want to be able to do the same thing on the linux machines, and write to a shared folder on the windows instance. The same line as above, but with the windows host and shares, still returns true, but the file is not actually created.
- If it didn't work, why does the line return true? This makes it very hard to debug and test errors.
- How can we get the script to work? Is the solution to mount the windows shares in linux? This does not seem like an appropriate solution, as we might change the windows shares or add new ones, we do not want to have to keep mounting and unmounting the shares on each linux instance.
We have added the linux user to the windows share permissions, but it does not seem to work.
Any help would be appreciated, thanks.