Setting up Drupal and PHP on Dreamhost

I have been using Drupal for the first version of this blog on my own computer, so I was pleased to see that the hosting company for ChristopherVickery.com (Dreamhost) was offering a one-click install of it for sites that they host. I like Drupal because it is FOSS, and especially because the default theme passes both XHTML and CSS validation. But the one-click installer didn’t let me customize Drupal as much as I would like, so I decided to download and install the package myself. No problem: just download the distribution, unpack it, and provide a symbolic link from nftfr to the directory where it was unpacked. Updating Drupal consists of downloading and unpacking the new distribution, copying $OLD_INSTALL_DIR/sites/default/settings.php to $NEW_INSTALL_DIR/sites/default/settings.php, and changing the symlink for nftfr. (You also have to copy over any changes made in the $OLD_INSTALL_DIR/themes/garland/style.css file, run update.php from the new installation directory in case the database structure changes, and create the directory $NEW_INSTALL_DIR/sites/default/files.)

But both Drupal and phpAdmin for the MySQL database complained about lack of mbstring support in the hosting company’s PHP installation. This meant installing my own copy of PHP. The support wicki turned up a script for installing one’s own copy of PHP. I tried the second version provided, which consisted of an initialize script that downloaded and expanded all the necessary libraries, and a second one that ran through configure/make/install for each package. I googled each package to get the current version numbers, and updated both scripts accordingly. There were two problems:

  1. The current version of the imap package from U. Washington was listed in the scripts as being in an “older versions” directory in the scripts, so that had to be fixed for the download to work.
  2. The current version of the CCLIENT package’s asks whether or not to include IPV6 support, but the prompt gets directed away to /dev/null by the script, so the script appeared to hang when it got to configuring that package. I did that step manually, and re-running the install script then worked fine.

I prefer to use PostgreSQL for my database rather than MySQL, partly because of familiarity, partly because of the FOSS issue. But I haven’t looked into whether it’s possible to set that up on Dreamhost or not. I was able to do it for the version of Drupal running on OS X Tiger without problem. Getting it to integrate with PHP on Leopard, with its mixed 32/64 bit libraries will be a topic of future posts.

Update 2008-06-23: From the DreamHost Support Wiki:

  This is a list of technologies not supported and will not work on a DreamHost account.
    * PostgreSQL - PostgreSQL or allow for it to be installed by shared hosting customers. MySQL is the only database offering. 
    * Java / JSP / JavaBeans 
    * mod_perl 
    * SpeedyCGI 
    * Virtual Private Server