Project - Drupal In Oberlin: More Than One Way To Skin A Cat

Note that as a cat owner, I really hate this expression. I need to find some cool geeky phrase to replace this. However, it is the truth of the matter when it comes to Drupal. Often times, when I find myself looking up info on how I might achieve a type of function or get one thing to interact with another, a few different projects pop up from the module project area of

The same can be said for when you are just tweaking around with various things that don't necessarily have to do with choosing and installing a module. Last week is when I found myself experimenting with a migration of a site on a new install.

Migration Install Method 1

I would be importing the database from the file that Tom sent me. I had changed the first few lines of the SQL file so that it would create a db with a different name. In my case, it would be 'inoberlin', his of 'tom_inoberlin' seemed too lengthy. Of course I created a database specific user for this.

Tom also let me have his site files (images that appear on the events calendar, logo, INC files, PHP, etc..), so I copied almost all of them over to the new folder that I had set up on localhost for this install. Part of me was skeptical that by copying these files, that Drupal install might be more apt to errors and be quite a "dirty" installation. Still, sometimes you gotta try.

With the Drupal install chowned and chmodded appropriately, I ran an install. After entering in the database name, password, and username, I pressed on. That is when Drupal gave me an error:

I chose to merely run the update script and see what happened. Of course, this means I got the access denied error since my settings.php file always has $update_free_access set to FALSE (secure). Changing it to TRUE I ran the update script again.

Suddenly I found myself at the front page sans all styling information and header/logo images. The front page read "Page not found". It was quite scary and I feared the worst. My suspicions that this install method was too dirty seemed to be confirmed.

Migration Install Method 2

At Tom's suggestion via email, I tried to do this with a cleaner method this time. There was a bit of trickery thrown in since I created a fake database with a chintzy username/password, granting that dB user with just privileges specific to that database.

Using that empty database, I did a clean Drupal install, which was successful. Back in the SQL, I would end up dropping the fake database (and user). Then I imported Tom's database again, creating a database-specific user as seen before in Method 1.

Inside settings.php I would make more changes, both to the database settings and to the $update_free_access section, changing that to TRUE again. I ran the update script, changing $update_free_access back to the secure setting of FALSE when done.

The same problem came up with the missing styles, theming, and prescense of header logo image. I figured there had to be something wrong with it beyond just a "dirty install" so I did a bit of research, finding this jewel of info. I did as instructed, running this command in PHPmyadmin: UPDATE system SET status=1 WHERE name = 'garland'; then UPDATE variable SET value='s:7:"garland"' WHERE name = 'theme_default'; TRUNCATE cache; It worked so I breathed a sigh of relief.

Another thing that was tugging at my suspicions is that the cause of the "page not found" on my front page was that Tom set his front page to something different than the default "node". Since I had not installed any of the modules yet (I wasnt that ballsy), it was likely that if this was the case, it would be set to a page that was specific to one of these not-yet-installed modules. Sure enough, it was set to "upcoming_events" which I knew was tied to a calendar module that I had on my "modules to install" screencap provided.

The night was filled with an install of 15+ modules and a couple themes. It got daunting since I had a few module projects that had recently been updated. I was up for the challenge. At some point, I would periodically check the site after a bit and see how the site was coming back together, now being able to actually call up the database tables created for that module. I even installed the theme that InOberlin uses called Acquia Marina. The site was pretty much ready to go. I cant wait to finally theme some stuff. Not sure which theme set I should base mine on but people are all aflutter about Zen and Studio.

Project - Drupal In Oberlin: Unexpected

Some weeks after my last post, I got in contact with an old friend from back in my San Francisco residency days.  Now out of the real estate business, Tom would find himself back into his home state of Ohio.  In only a brief time, Tom had already begun a community-based project in Drupal.  Using his skills, he has set up a site where Oberlin residents now can find out about ANYTHING going on in town.  Other people can now post events.

While the site is looking really good and very organized, Tom still finds his "design-fu" weak and asked me if I might come up with something.  Without a deadline to this project, it was perfect timing given my current workload at the time and an upcoming convention. Who knew that a Drupal project would find me some weeks after my last post? 

With a completed WordPress site behind me, I decided to bide my time before taking on more projects or starting new ones.  Honestly, with an upcoming weekend away from home (and a performance on that weekend's Saturday night), I didnt want to get involved in any one thing since I needed to get my arse in gear.   I was still idle when I got back, slowly getting back into my pace of household chores and other mundane tasks.  However, outside of a 3D graphics project, I found myself really wanting to get a move on with this project.  My only hope was that I could still learn more about the functionality aspect to Drupal despite that I was doing more of a design makeover rather than anything else.

Tom gave me the database, the site's files and a bit of instruction on how I might do a live site > localhost migration.  First thing I did was get to know the localhost file locations for a couple of server configuration files to help me get a 4MB+ database imported.  In the case of my Ubuntu-based LAMP setup, the php.ini file was relatively easy to find (/etc/php5/apache2).  The "upload_max_filesize" and "post_max_size" were changed to 12M since my file was a little over 10MB.  In addition, I wanted my database to be a different name so I changed the first few lines of the .sql file to create a dB called "inoberlin".  Import went least for now.