Drupal

MAMP Begone! An alternative Apache, MariaDB and PHP stack for Mac OS X

Update: The docs below are deprecated. Please refer to these docs going forward. Also, MAMPbegone is now brewStack! Thanks to @tlattimore for providing the cool name!

I have had an on and off relationship with MAMP over the years. I love how MAMP makes it super easy to install a nice stack of web server tools in an OS X Application, but it does have its share of limitations.

  • Running older version of PHP. Sometimes I would like to run a slightly newer version than is available.
  • Running Apache 2.0. No Apache 2.2 love in MAMP yet.
  • There isn't an easy way to add new PHP extensions. I recently needed XMLRPC and had to track down a binary from the Moodle community. Another example is intl. I needed that for some recent Symfony work.
  • Pear doesn't always work out of the box without some fixes.
  • While it is open source, if I have to compile much to fix MAMP, I might as well compile PHP from CLI from source as I did for years prior to using MAMP.

I do appreciate MAMP! It is great and I still recommend it for anyone who can live within its feature set and limitations. I often recommend it for new Drupal users. MAMP allows them to get started very quickly.

As I mentioned above, I have also spent a bit of my development life compiling Apache and/or PHP from source to build local development environments. This is something that I don't want to do again. So what do I want? I want to have a local development evironment with the following characteristics:

  • Easy to install and configure
  • Easy to upgrade
  • Easy to extend (Adding new PHP extensions or upgrading PHP)
  • php-cgi for use with Drush qd
  • Secure
  • Easy setup for virtual hosts and changes to the /etc/hosts file. I can, but don't need to spend the time configuring this by hand all the time!
  • Lastly, this needs to support my Drupal and Symfony development needs! I have included some additional bits I use, such as drush and Composer.

Blog Category: 

Drush shell functions for easy module uninstalls

When working with Drupal in a local development environment, it is often necessary to disable and uninstall modules for various reasons. A module must be disabled before it can be uninstalled. I found it useful to have shell functions to issue the Drush pm-disable and pm-uninstall commands.

To set this up, add the following functions to the appropriate shell config files (ex: .bash_profile, .bashrc, .zshrc):

Bash:

drush-ui() { drush pm-disable -y $@ && drush pm-uninstall -y $@ ;}

Z shell:

drush-ui() { drush pm-disable -y $@ ; drush pm-uninstall -y $@ }

Blog Category: 

DrupalCon Chicago 2011 Takeaways

It has been a little over a week since I came back home from DrupalCon Chicago. I have to say that I am still processing the many discussions and sessions I attended. I do feel that I can write a bit about my experiences at this point. Considering this is my first DrupalCon and that the trip was expensive, I feel both excited and blessed that my employer was able to send me this year.

Blog Category: 

Pages