skurty
skurty

Reputation: 739

Fail to clear cache with Symfony on Vagrant

I'm using Vagrant on Windows with a box created on PuPHPet (Debian 7 and PHP 5.4). I installed a new project with Symfony 2 and there is some errors to clear the cache like "Cannot rename" or "Failed to remove directory".

I used the default configuration but also tried to:

and nothing changed, still the same errors.

How can I set the right permissions on the Symfony's cache with Vagrant?

Thank you

Upvotes: 5

Views: 2789

Answers (1)

Im0rtality
Im0rtality

Reputation: 3533

PHPStorm (there's Community Edition) has auto upload feature, which I successfully used for Vagrant file sharing. However you need to disable Vagrant's file sharing (NFS doesn't work with Windows out of the box anyway).

This is one say sync, thus you need to clear cache from inside of box.


Settings > Deployment (path to settings page depends on IDE version) add deployment server:

Connection tab:

Type: SFTP
Host: box IP
Port: 22
Username: vagrant
Password: vagrant

If I recall correctly PuPHPet disables password login in favor of key based access, so use appropriate method (key was publicly stored in puphpet's repo).

Mapping tab:

Local path: project root locally
Deployment path: project root in box

Settings > Deployment > Options:

Upload automatically: Always
Upload external changes: Yes
Delete target items when source does not exist: Yes

There's NFS Vagrant plugin for Windows, but I could not get it to run as of March 2015.

There's also rsync sync method from Vagrant which offers one way sync as well, but I liked PHPStorm's autoupload more.

Upvotes: 2

Related Questions