如果 PhpStorm 上的大小没有改变,Vagrant NFS 共享不会显示更新的文件

Vagrant NFS share doesn't show updated file if size doesn't change on PhpStorm

我搜索了很多地方,但没有找到问题的答案。 同样的问题已经在这里发布:https://serverfault.com/questions/534507/vagrant-nfs-share-doesnt-show-updated-file-if-size-doesnt-change

但解决方案仅适用于 Sublime Text。我使用 Jetbrain PhpStorm 8.

问题完全一样,如果文件大小没有变化,我的 NFS 不会检测到我的文件更改。

这个问题已经两个星期了,它会让我抓狂。

根据 Laracast 论坛的这一部分: https://laracasts.com/forum/?p=1757-slow-responses-on-homestead/p1#p7700

"Make sure you edit /etc/nginx/nginx.conf and set "sendfile" to off if using NFS or you will run into weird caching issues."

我也使用 PHPStorm8 - 进行了修复,并重新加载了 vagrant。 (注意做一个简单的 nginx 重启并没有解决问题,但是 vagrant reload 确实)

有点晚了,但我遇到了同样的问题,我发现 vagrant 使用的底层 winnfsd.exe 库存在漏洞(正如您在此处看到的:https://bitbucket.org/jankowfsky/winnfsd/issues/7/winnfsd-doesnt-always-overwrite-files)。

有一个更新的库解决了这里的错误:https://bitbucket.org/yannschepens/winnfsd-new/downloads

您需要下载更新的库并替换现有的库,该库位于磁盘上 vagrant-winnfsd 插件的安装目录中 - 对我来说是

C:\HashiCorp\Vagrant\gems\gems\vagrant-winnfsd-1.0.11\bin\winnfsd.exe

所以,只需下载 winnfsd.exe 并替换现有的。启动 vagrant,问题就解决了。