Since I've been needing to revamp an old webpage for a while, figuring out Drupal was on top of my summer to-do list. I won't lie and say that getting to know Drupal was a breeze, but I do believe that the initial frustration is well worth the effort. Most of the problems I encountered while installing Drupal and setting up the website seem to be fairly common, so I've decided to list them all here together with their solutions.
Installing Drupal 6:
This Lullabot video is the best installation tutorial I found. Pay special attention to the discussion of the invisible .htaccess file. That file has come to haunt me several times!
Making the invisible .htaccess file visible:
I use Fugu as my FTP program and it allows you to view hidden files by selecting "show hidden files" from the SFTP menu. You'll also need a way to edit the invisible file - I downloaded the free trial version of BBEdit.
Fixing the Register_Globals error (on 1and1):
After following the installation instructions, I received the following error:
"The following error must be resolved before you can continue the installation process: register_globals is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when register_globals is enabled."
My web host is 1and1, and in order to fix this problem, you need to pull up that invisible .htaccess file and place the following line AddType x-mapp-php5 .php in it. I put it on the top of the page. Now upload the corrected .htacess file.
Enabling Clean URLs (on 1and1):
Clean URLs eliminate the "?q=" in internal URLs. This is important for search engines and SEO. I kept getting the message: "Your system configuration does not currently support this feature"
This doesn't necessarily mean you can't enable them. In some cases, you just need to tweak the code a little. To enable clean URLs on 1and1 it's back to the .htaccess file. You need to uncomment the following line:
# RewriteBase /
In other words, remove the # symbol.
Configuring the cron so you don't have to run it manually:
For an explanation of what it is and why you need it, check this Drupal page.
- You'll need a way to get "shell access", which means that you need to be able to connect to your web host using telnet or SSH. I switched to my husband's PC and downloaded Putty (Windows only). There's a way to do it on the Mac terminal but I couldn't figure out how.
- Launch Putty and log in. For screenshots, check this tutorial.
- Type "whereis lynx" or "whereis wget" (without the quotation marks) to see where lynx or wget is located. This should return something like: /usr/bin/lynx or /usr/bin/wget. Check this tutorial for why you need to know this.
- Type "crontab -e" (without the quotation marks)
- If the "whereis wget" command returned "/usr/bin/wget", enter the following line:
45 * * * * /usr/bin/wget -O - -q http://example.com/cron.php
to have a wget browser pull up your cron page 45 minutes after every hour. Replace example.com with your domain name. You can of course customize the schedule for your crontab (check this tutorial). Note that you need to enter the letter O in the above example and not a zero. (I've learned that lesson the hard way).
- To save, hit ESCAPE and type ":wq" (without quotation marks), then hit ENTER
If you don't want to deal with all this, try the poormanscron module. It basically simulates a cron job.
Hiding the link to the homepage on nodes:
This is relatively easy to do, but it took me a while to find the solution. Simply download the Menu Breadcrumb module. It allows you to hide the breadcrumb if all it contains is a link to the front page.
Warning: Cannot modify header information error:
This error was caused by a line of white space I accidentally left after the opening and closing PHP tags in the template.php file in my theme's directory. So, don't leave any extra spaces!
Hiding the authoring information on some pages/content types:
Go to Administer >> Themes >> Configure to configure the global settings. Check or uncheck which content types should display the authoring information (see also).
Turning the Statistics module on in Drupal 6:
Go to Administer >> reports >> access logs settings
Creating a sitemap for your Drupal site to submit to Google:
I used the XML Sitemaps Generator and submitted it to Google.
Setting up a file sharing application: