RSS 2.0 New Entries Syndication Feed Atom 0.3 New Entries Syndication Feed

Show blog menu v



Use it



Sibling projects

RIFE powered

Valid XHTML 1.0 Transitional

Valid CSS!

Blogs : Archives

< W3C helping (?)to standardise AJAX   Lets see how he does >
Setting the docroot in PHP Eclipse

This is not a RIFE post perse, but since my dayjob is working with PHP, and since I could not easily find this information elsewhere, I figured I'd write a bit about it.

I had looked at using Eclipse as my php IDE before, but the problem seemed to be that Eclipse wanted everything to be in its workspace/project directory structure, whereas I like to have my php documents in my DocumentRoot directory.
The workaround I found before was to symlink from the Eclipse project directory to the docroot, but that seems like an ugly hack, and working on Windows one would have to work with the not so well documented 'junction' feature of window nt..

When I was browsing the site I happened to find this post that explains how to set up the structure. Because it is a bit lacking in its explanation, I give you a more complete explanation, where I assume you have installed EasyEclipse ' LAMP distribution. Any other Eclipse + phpEclipse ought to work as well.

  1. Start Eclipse, and create a new PHP project, with a name of your choosing
  2. uncheck the 'project contents' box, and then fill in the path to your php files (not the docroot perse,e.g. /www/htdocs might not be it, cause you also need files from /www/settings, in this case you'd fill in /www)
  3. click 'finish'
  4. now rightclick on the project folder in the navigation pane on the left, and choose properties.
  5. Choose PHP Project settings on the left, and click 'use project settings'. Fill in the URL to your local site and the docroot (/www/htdocs in my example) . Add the Include path(s)
  6. Now click on the PHP Parser link on the left in this same window, and choose 'use project settings', so that the PHP Parser will know to use your projects' specific settings.

Now click OK and you're done with this part.

EasyEclipse also comes with CVS/SVN and DB tools, which a typical LAMP setup probably also uses, but setting those up are something I leave up to you.

posted by Maarten Stolte in programming on May 29, 2006 3:06 PM : 2 comments [permalink]


Re: Setting the docroot in PHP Eclipse
You might like to read this tutorial about workspace options for PHPEclipse:
Re: Setting the docroot in PHP Eclipse
thanks, also alot of other things in there I could use!

Add a new comment

Comments on this blog entry have been closed.

< W3C helping (?)to standardise AJAX   Lets see how he does >
Google web