Aptana IDE just works on OS X with drupal

Submitted by shunting on Tue, 07/14/2009 - 19:38

After a few days of on-and-off tinkering with Zend Debugger (and then Zend Server (and then xdebug.so (and then tinkering with php.ini (and all the while wondering what I would do when the 30-, 29-, 28-day trial ran out)))), I gave up the unequal struggle and tried the (eclipse-based) Aptana. Surprise!

It installed easily -- just a zip, not even a *.dmg file -- and there was nothing else to install. I could:

1. Use my existing Apache/PHP setup,

2. import the files under my existing drupal DocumentRoot at a new project;

3. not tinker with .htaccess, settings.php, or anything else.

The only issue I encountered was that Aptana didn't default my apache port: 80. As a result, the drupal home page would show up in the Aptana's preview as if the install was new ("Welcome to your new Drupal website!") and the login would fail.

However, Aptana's default port can be changed (for build 1.5.0.025655):

1. Select the drupal project.

2. Go to Project -> Properties -> PHP Preview.

3. Check Override workspace settings.

4. Select the Use server radio button.

5. On the same line as the radio button, look for a downward-pointing triangle to the right of the name of server being used and click it; a dropdown appears.

6. Select "Add new server" from the dropdown, and then Choose Server type from the dialog that appears; I selected Apache.

7. An "Add Local Apache Server" dialog comes up. Enter a name, say "My Local Apache Server (port 80)," and then browse to and select the httpd executable, log files, and Document Root, and check the parameters for host (in my case, localhost), port (80!), start, restart and stop.

8. OK your way out of the dialogs, and your newly annointed "My Local Apache Server (port 80)" (if that was the name you entered) will now appear in the servers listed on the downward-pointing triangle's dropdown. Select it.

9. Decide whether or not to check the "Append project name" box name to the right of the downward-pointing triangle. Because I gave my project the same name as my drupal subdirectory under DocumentRoot, I checked that, and it worked.

9. OK out of the project properties.

10. A functioning drupal home page should now appear in the Aptana preview pages. (And if you logged in to the site directly in the browser, the Aptana preview will also have you logged in.)

And now, to break some more code. I love jEdit, but adding and removing dprint_r statements got old after the first 10,000 or so...

UPDATE For more on xdebug trials, see here.