drupal

How to Recover a Broken Drupal Install Resulting from a Full Hard Drive

Tagged:  

This is amazingly, the second time I've filled my server's hard drive, and the results are becoming predictable. One moment, things are working fine, the next, cron alerts you with something like this:
Table [tablename] is marked as crashed and last (automatic?) repair failed query

This is a bad warning to get, and running df on the server confirms that indeed my hard drive is full. Fixing this is a matter of doing some minor MySQL hacking to clean up all the tables:
mysql -u'drupalusername' -p
> use drupal_DB_name;
> check table tablename;
> repair table tablename;

Then, simply iterate this for each broken table reported by cron.php, and you will soon have a repaired DB. Whew.

New Server!

Tagged:  

When I started this blog more than two years ago, it was an experiment in blogging and an experiment in running my own server. At this point, it's safe to say that the results of the experiment are in. While running my own server out of my attic has been an enlightening experience, teaching me about everything from DNS to PHP, ultimately, I have come to the conclusion that if I want a reliable, powerful and secure sever, running it myself is not the way to do it.

In that light, today I've transferred this website over to the people at slicehost. This will give me (almost) all the freedom of running the server myself, and should relieve some of the headaches I've had for the past couple of years when it came to power outages, comcast and AT&T outages, and the like.

Moving the site over has been a bit complicated, so if you see anything weird, let me know via the contact link, which should work as of now.

Papa's Got a Brand New Look

Tagged:  

OK, here's the scoop. I've given the site a major revamp and a new look.

Here's the old one:

And the new:

And here's a poll to make a vote and/or comment on the changes.

There were a number of reasons I wanted to make a change, and I think the new design accomplishes most of them. First, I wanted to change to a static width layout. It was a long time coming, and now people with big screens and/or high resolution won't have to deal with ridiculous line lengths. Second, the new design should do wonders for links, which didn't really stand out before. Third, I've dropped the login box at the right, since I was the only one that ever logged in. Actually, I've dropped the whole column, so we're down to two columns now, not three.

Something I wasn't really planning on doing was the color change. I liked the muted greens, but I think the topics I discuss have largely moved away from environmental ones, so perhaps the blue makes more sense and will better evoke what I'm going for.

Thoughts? Bugs? Comments?

Moving and Updating Drupal

Tagged:  

You may recall from one of my earlier posts that I was running two servers in my attic when I originally set things up at the end of last summer. Originally, I had one server for Zimbra, and the other for Drupal. I did this because I was scared that if I didn't, people would be unable to access the website without getting the email, and vice versa. I had no familiarity with apache, and a limited understanding of ports.

Well, today I had a moment of inspiration, and decided it was time to retire the older of the two servers, and to move the Drupal installation to the Zimbra server.

In addition to reducing the number of servers that I am maintaining, this also reduces the amount of energy I'm consuming, and also allowed me to update my Drupal installation. I was running Drupal 5.3 because that was the one that was in the Ubuntu repos, but I am now up to 5.9 (the most recent version).

So, how did it go? It went pretty well. I had a backup of everything on my second server already, so it was largely a matter of copying things to the right places. Probably the most important lesson I learned is that symbolic links are not followed by rsnapshot, so my backups until this time have been incomplete. In my new installation, I am not using symbolic links, so that problem should be alleviated.

Another challenge I encountered was that I had to update my dbconfig.php files to line up with the new database configuration, and I also had to spend some time getting the correct document root to function in apache2, which I also just installed.

The biggest problem I encountered was that the clean URL's broke, and were a pain to get fixed. I have fixed those now, so the only remaining thing is to get gallery functioning again. The thing to remember here is that clean urls function by directory, and that the higher up the directory tree you go, the higher the priority of the .htacces files.

As for Gallery2, I have to say it is a big pain, so I may just revert to trusting Google with my images. We'll see if I have another moment of inspiration.

Notes on Drupal Multisite

Tagged:  

As I mentioned in my previous post, I just finished setting up a drupal multisite configuration. It took a lot of work to get this all figured out, so I thought I would put some notes together for those that may follow in my footsteps.

What challenged me the most with figuring this out were the concepts, so I want to touch on those more than anything else.

The way to set up a multisite installation consists of the following general steps:

  1. Make a new drupal database in your MySQL install
  2. Set up the directory hierarchy in your drupal directory
  3. Set up your second domain as a virtual host in apache
  4. Configure your settings.php file to point to your new database
  5. Run the install.php script from your browser

That's really it, but it's kind of a complicated process. Some further notes expanding the concepts from above:
1. When you're making your new MySQL database, I found the command line to be the easiest way to do it, but there are a lot of instructions on how to do it with web-based tools. For a good tutorial on the command line method check this out http://drupal.org/node/22675.

2. The directory hierarchy was one of the more complicated parts of this for some reason. Essentially, it should look like this:

drupal/sites/default
drupal/sites/site1.com
drupal/sites/site2.com

Within site1.com and site2.com go your settings.php and dbconfig.php files. If you like, you can put modules and themes directories as well. If you do, drupal will use these modules/themes if there is not a module/theme of the same name in the usual directory. This is really useful because it allows modules to be installed on one site, the other or both, depending on where you put the module's directory.

3. I can't remember exactly how I set up the virtual hosts, but the Internet has many resources on this one. The trick to know is that one virtual host points to the drupal/sites/site1.com directory, and the other points to the drupal/sites/site2.com directory.

4. No tricks here or on number five.

Good luck!

New Website - CharityHikers.org

Just a quick post today to announce that I have finally figured out how to run a drupal multisite installation, and I have finally converted my old website, CharityHikers.org over to Drupal. Making charityhikers.org a dynamically driven site has been one of my goals since about 2004, so completing this task is giving me an excellent dose of satisfaction.

The site began as a place where I could put up information about my hike for AIDS research, but I have developed it into something that other people can use to fundraise for their own causes. With this step, I think it is finally getting pretty close to a useful tool, but I still have a couple of things I'd like to accomplish with the site.

The biggest goal I have for it is to allow hikers to sign up, and then update their profile with their charity and personal information, and to have that dynamically generate the menus, pages, etc. that are needed for the site so that their new information is automatically integrated. At present, pages have to be manually created through the CMS system, which is a bit of work, but it's not too bad all in all.

The second goal I have is to allow picture uploading for hikers. It doesn't take a whole lot of storage space to do this, and it seems like a good service to provide. My current plan is to use gallery2 to accomplish this feat, but I'm having some serious issues with the database right now.

Anyway, goals and road maps aside, I'm really quite happy with this change. My real goal is for this site to really start bringing in donations. So far it's brought in a little over $10K, but in the scheme of things that's really not a whole lot of money...

Bots be Damned!

Tagged:  

Well, I know my site must be really popular now.1 I have begun getting my first comment spam from a lovely person hawking porn via links posted as comments.

Math captchas have been implemented. Bots be damned!

1This is a stab at being facetious.

Marvelous RSS, Marvelous Google

Tagged:  

I've been working on the site a fair amount lately, and have added a couple of new features. The first one is a set of those ubiquitous bookmarking buttons for Technorati, del.icio.us, etc. that you should be seeing if you are reading this online. I've been trying to optimize this blog for a bit, and I figured I probably need these sooner or later.

The other thing I added today is the "Subscribe" block, which for the moment is listed on the left under the recent music. I did a little playing around in the heart of Drupal, and modified this block so that it has text links for RSS and for an email service I just discovered from Google.

New Theme Poll

Tagged:  

I've finally taken a moment to change the official theme of my site. I have thoughts about the change, but I can't share them, because to do so would be to bias the poll I've created here.

So, that, in a nutshell is the question I have today. Do we roll with the new theme that you should be seeing now (if not, hit refresh), or do we roll with the old theme that can still be used if you log in and then edit your default theme to Garland.

After all those posts about elections, don't you want to vote? Go ahead, follow the link above. Share your opinion...

Which Theme Should We Roll With

Tagged:  
New Theme - Plenoma
100% (5 votes)
Old Theme - Garland
0% (0 votes)
Total votes: 5
Syndicate content