I’m learning Eclipse PDT for PHP development. In pretty much all tutorials I’ve read they put the eclipse workspace inside the document root of the webserver (htdocs in my case).
Is this common practice? I mean; I don’t like the configuration files on my (test) webserver. Isn’t there a way to publish the changes to webserver’s folder from the workspace elsewhere on the filesystem?
You can have the workspace in one directory, and projects in any other directories you’d like (not necessarily sub-directories of the workspace).
The location you specify as “workspace location” is the place where some configuration files (internal to eclipse) will be stored, I believe.
On my (Linux) machine, I have :
/home/squale/bin/eclipse-workspaces/1/home/squale/developpement/:aggregatorphp-src-5.3...On my Windows machine at work, I have :
d:\bin\eclipse-workspaces\pdt-1\d:\projects\project1)That way, too, workspace files are in a really separate directory, not deployed to any server, and not in the SVN’s checkout structure or even near it.
Putting the workspace inside the docroot is maybe easier, but works only if you have one virtual host, anyway (and not a couple of projects, so).
With older versions of Eclipse, sometimes, when Eclipse crashed, the workspace was totally corrupted, and had to be deleted ; not habing the projects’ files in sub-directories of the workspace was really useful, by then.