PDT + XAMPP&MAMP = love?

16 views
Skip to first unread message

Jacek Pospychała

unread,
Aug 21, 2012, 2:52:03 PM8/21/12
to pdt-extensi...@googlegroups.com
hi Guys!

how's going? I'm wondering if you ever heard or seen any Eclipse
plugin that would help setting up PDT for XAMPP/MAMP/plain Apache?
I frequently see here and there that people spend some serious amount
of time getting PDT to put files in proper Apache dir, getting
XDebug/ZendDebugger configured, etc.
Maybe there could be some plugin that would automatically (or with
little help) find out Apache install dir (or look in default XAMP/MAMP
dir), configure debugger, create some vhost, etc?

It would be really nice...

cheers


Jacek

Martin Eisengardt

unread,
Aug 21, 2012, 2:57:42 PM8/21/12
to pdt-extensi...@googlegroups.com
Hi :-)
 
 
Feel free to add your feature requests ;-)
 
Compared to tomcat you may be able to add an existing pdt project and configure it to represent a vhost.



Jacek

--
You received this message because you are subscribed to the Google Groups "PDT Extensions Platform" group.
To post to this group, send email to pdt-extensi...@googlegroups.com.
To unsubscribe from this group, send email to pdt-extensions-pl...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Martin Eisengardt

unread,
Aug 22, 2012, 2:47:43 AM8/22/12
to pdt-extensi...@googlegroups.com
What needs to be done in pdt?
The main difference is that pdt needs to know the web root folder (htdocs folder) of a project. If the user did not set we would simply use the project root. Maybe we should add a single property to setup a project local path. Or maybe we should add a flag on source folders controlling the souce folder that is the web root. What do you think?
See http://www.slideshare.net/GorkemErcan/implementing-generic-servers-for-eclipse-webtools for some technical hints. Actually I did not find a newer tutorial or any other thing but revisiting git the extension points are still used. I reviewed my old code for project reddwarf and integration of apache httpd should be easy.

Jacek Pospychała

unread,
Aug 22, 2012, 3:01:09 AM8/22/12
to pdt-extensi...@googlegroups.com
hi,
I was thinking about few things:
1. project location that would enable launching on the local server
2. simplified debugging
3. easy access to server logs

ad 1.
Now by default PDT/Eclipse creates projects in workspace.
many people set htdocs as workspace (htdocs gets riddled with eclipse
files), others create vhosts for each project specifically.
Ideally user should have easy choice: create PHP project in workspace
or in htdocs (htdocs dir should be automatically discovered with some
guesswork + configurable for non-default Apache/MAMP/XAMP installs)
For projects in workspace, they should have an option like "Create
vhost" that would inject proper configuration changes into Apache
httpd.conf

ad 2.
There are countless tutorials online on how to configure
XDebug/ZendDebugger on Apache. Eclipse plugin could do this
automatically, e.g. you press "Enable XYZDebugger" and it updates
Apache config, PHP config, puts files in right places and tests if
debugger works.

ad 3.
There could be a Apache/PHP log console, showing realtime logs from
apache. So that if you enter your localhost url in browser, php
generates some errors, you'd get them immediately in Eclipse. Now you
have to switch to console, open log file, or keep window open with
tail -f php.log

Now what needs to be don in PDT - I guess that for item 1, there
should be some extensibility to provide initial project location
choices so that PDT could show them to user in new project wizard.
Other items probably could be developed independently.

Martin Eisengardt

unread,
Aug 22, 2012, 3:13:50 AM8/22/12
to pdt-extensi...@googlegroups.com
My suggestion is to follow the wst standards. Because they are very flexible.
That means to not automatically discover existing installations through project properties or other things.
 
Instead use the Servers view to create servers. Other plugins (f.e. tomcat) already are aware of two kind of servers:
a) re-use local installations (and automatically discover everything)
b) download and install new servers
 
This is flexible enough for any future request including embedding a pdt project into tomcat or other servers.
 
1):
This would mean: A simple component in the new project wizard letting you choose an existing apache server as project location. Including a button to create a new server. The new server wizard popups and lets you choose an existing location. Creating new webapps should IMHO already contain this component.
 
2):
That would be really fine. A simple context menu on the servers view. As you are able to start the servers in either run mode or debug mode there maybe no need for a context menu. Instead a simple property on the servers configuration saying what debugger to be used (similar to the pdt properties page).
 
3):
In WST: As soon as you "start" a server you already grab a console view and have to launch an application. everything that is needed to display the server logs in realtime.

Robert Gründler

unread,
Sep 2, 2012, 2:50:56 AM9/2/12
to pdt-extensi...@googlegroups.com
Sorry for my late reply, have been quite busy these days.

I like the idea of deeper apache integration, although i think it might be tricky to get this properly working on multiple platforms.

Martin seems to have some background on how this could be implemented using WST, that sound like a good approach.

A quick search brought up this plugin - (last commit from 2010 it seems): http://code.google.com/a/eclipselabs.org/p/eclipse-plugin-apache

As for the realtime log viewer: I've thought about this for the Symfony plugin as well and created a patch for the LogViewer plugin, which
allows extenders to alter loglines, so one could link to source files directly from log files from inside eclipse (stacktraces etc):

http://code.google.com/a/eclipselabs.org/p/logviewer/issues/detail?id=63

Unfortunately the author seems to be busy, as there has been no activity for some time.


regards

-robert

Martin Eisengardt

unread,
Sep 6, 2012, 5:05:22 PM9/6/12
to pdt-extensi...@googlegroups.com
I will have a look at the apache plugin.
 
To see it open the "servers" view. Create a new server and have fun with this small apache server.
 
:)

--
You received this message because you are subscribed to the Google Groups "PDT Extensions Platform" group.
To post to this group, send email to pdt-extensi...@googlegroups.com.
To unsubscribe from this group, send email to pdt-extensions-pl...@googlegroups.com.

Martin Eisengardt

unread,
Sep 6, 2012, 5:39:57 PM9/6/12
to pdt-extensi...@googlegroups.com
Please revisit the first 4 server types related to apache httpd. Is it ok? do we need some other server type per default?

Reply all
Reply to author
Forward
0 new messages