Skip to main content

September 2009

Standard Drupal Modules

Posted in

Every time I set up a Drupal site, there are certain modules that I invariably install. For my future reference, here they are:

Converting a simple site from ASP to PHP

Posted in

Maybe I'm a glutton for punishment, but I've taken on a project for which I've promised to convert a site from ASP to PHP so that it can be expanded using some tools already written in PHP. The site is basically static HTML, just using ASP for include files and some minor formatting settings.

Here are the steps I followed to convert the site from ASP to PHP:

Changing the domain at which a Drupal site is accessed

Posted in

I've just had a bit of a nerve-wracking site launch; we'd been developing a new auxiliary website for an organization that would eventually live at "," but was developed in the meantime at "". We followed the steps for launching the site and I thought it would work pretty easily:

Setting up mail server on Rackspace cloud server

Posted in

For a couple of projects lately, I've had to set up a Rackspace cloud server with enough email capacity to send emails and to receive them to be processed by a script. Here are the steps I've followed:

Making sure a daemon runs on server reboot

Posted in

Another piece of code that I always seem to have to look up when I need it... The command for getting mysqld (or another daemon) to start up when the server reboots is chkconfig, used as follows:

chkconfig mysqld on

If you just enter chckconfig, it will output a list of the daemons and their current status:

Running scripts with rails script/runner

Posted in

Lately I've been needing to write short Rails scripts to make changes and updates to items in the database and associated images. I repeatedly tried to create a freestanding script and then run it with "ruby script/runner [script-name]," to no avail.

In the end, my solution was just to put the script into the model file of one of my objects, then run it with "ruby script/runner [Object].[method]" -- this worked like a charm!

Restarting a rails app on shared hosting

Posted in

I don't work in Rails very much these days, so when I do go back to it I get frustrated that I've forgotten even the most basic principles and techniques.

If you've made tweaks to a Rails app and need to reload the cached version of the site, use the following commands to first find the process id (pid) of the dispatch.fcgi job, then kill that process:

  1. ps aux | grep ruby
  2. kill -USR2 [pid]