Four Tips for Initial Drupal Setup on Pair.com

Getting Drupal up and running involves a few squirrelly first steps that will literally either make or break your new site. At times they work like a charm. Everything falls right into place and your site is up and running in a matter of minutes. At other times, your head is at risk of a bloodying from banging it into the desk. If you are setting Drupal up on Pair.com and, like me, aren’t an Apache and Unix adept, you are at risk of the blood-on-head scenario. So to save your noggin, here is what I have learned over the last few days, using a combo of trial-and-error and talking to the good people in Pair.com support.

Trap number 1. Your database server is not the default localhost. This one is actually easy. On the “Database configuration” page the trick is to click the rather subtle “Advanced options” link near the bottom of the page. Then you can enter the name of the server.

Trap number 2. Register_globals needs to be disabled. To do this, set up an .htaccess file, and add the following code:

php_value register_globals Off

Trap number 3. Your system configuration does not support clean URLs. You could just ignore this one, but increasingly friendly URLs are seen as a basic site need. To do this, you have to expand the .htaccess file. Replace the one line in step two with the following more comprehensive code (where XXX is the path of your Drupal site if it’s not in the root):

<IfModule mod_php5.c>
  php_value magic_quotes_gpc 0
  php_value register_globals 0
  php_value session.auto_start 0
  php_value mbstring.http_input pass
  php_value mbstring.http_output pass
  php_value mbstring.encoding_translation 0
</IfModule>
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /XXX
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

Trap number 4. You run cron manually. There is nothing wrong with running Drupal’s cron.php by hand at first. However, if you set up a search engine or do other things requiring cron, sooner or later you are going to have to face this UNIX beast. To do it, you can either SSH into your server and enter the appropriate crontab or use the Account Control Center. If the latter, go to the Advanced menu and then the Crontab Manager. Choose how often you want it to run, then enter the following (where XXX is the URL of your Drupal site):

/usr/local/bin/wget -O - -q http://XXX/cron.php

With these out of the way, you should be off and running, ready to do the real coding for a fabulous Drupal site.

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment