Hi there. First of all thanks for this great plugin.
I am runing LAMP stack site development and share project files from my host windows machine to the linux vagrant virtual machine using NFS (thanks to your plugin).
Pretty standard PHP development environment.
I am having problem with php function file_put_contents. As default it is supossed to overwrite the file but what I'm getting using NFS is only partialy overwritten file. Let me show by example:
file_put_contents("test.txt", "test\r\ntest\r\ntest\r\ntest\r\n");
Creates new file test.txt if it doesn't exists and puts four lines of test text in the file:
test
test
test
test
Now let say I want to overwrite the file using the same command and put few less lines changed:
file_put_contents("test.txt", "test changed\r\n");
What I should be getting is this:
test changed
But what I get is:
test changed
st
test
So the file is not completely overwritten but only the few new bits from the begining of the file are changed and the rest is still there.
I also checked the behaviour using standard virtualbox "Shared Folders" feature and on diffrent machine (Macbook Air) where NFS is working by default so I don't need the plugin there and they both are working fine fully overwriting the file.
Could you please look into this matter? I really have no idea is it only the plugin or maybe there is a bug in winnfsd NFS implementation.
This is what my log displays when i change the file:
NFS GETATTR D:\vagrant\code\framework\test.txt OK
NFS GETATTR D:\vagrant\code\framework\test.txt OK
NFS ACCESS D:\vagrant\code\framework\test.txt OK
NFS SETATTR D:\vagrant\code\framework\test.txt OK
NFS WRITE D:\vagrant\code\framework\test.txt OK
Hi there. First of all thanks for this great plugin.
I am runing LAMP stack site development and share project files from my host windows machine to the linux vagrant virtual machine using NFS (thanks to your plugin). Pretty standard PHP development environment.
I am having problem with php function
file_put_contents
. As default it is supossed to overwrite the file but what I'm getting using NFS is only partialy overwritten file. Let me show by example:file_put_contents("test.txt", "test\r\ntest\r\ntest\r\ntest\r\n");
Creates new file test.txt if it doesn't exists and puts four lines of test text in the file:Now let say I want to overwrite the file using the same command and put few less lines changed:
file_put_contents("test.txt", "test changed\r\n");
What I should be getting is this:
But what I get is:
So the file is not completely overwritten but only the few new bits from the begining of the file are changed and the rest is still there.
I also checked the behaviour using standard virtualbox "Shared Folders" feature and on diffrent machine (Macbook Air) where NFS is working by default so I don't need the plugin there and they both are working fine fully overwriting the file.
Could you please look into this matter? I really have no idea is it only the plugin or maybe there is a bug in winnfsd NFS implementation.
This is what my log displays when i change the file: