T Input format

Filtered HTML

• Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>

• Lines and paragraphs break automatically.

C PHP code

• Vou may post PHP code. Vou should include <?php ?> tags, c Full HTML

• Lines and paragraphs break automatically.

Basics I: Site Configuration

As you can see I have the default option of Filtered HTML that allows me to enter some HTML code, and no PHP code. " Why would they have several options like this?", you might ask. We will discuss the reasons for this in more detail later on. For now, it is best to stick to Filtered HTML unless you have a specific need to add PHP code, or HTML tags that are otherwise not allowed.

The next option, Error reporting, allows you to decide whether to write errors to the screen as well as to the error log. While you are busy building the site, you will probably find it useful to select Write errors to the log and to the screen, so that you can determine what has gone wrong and when. However, once it is time to go live you should change this to Write errors to the log (seen in the drop-down list), as you don't want everyone to be able to read the system's various errors as this may divulge information to malicious users who might be able to use it in an attack on your site.

The Error handling section now looks something like this:

T Error handling

Default 403 (access denied) page:_


This page is displayed when the requested document is denied to the current user. If you are not using clean URLs, specify the part after "?q = ". If unsure, specify nothing.

Default 404 (not found) page:_


This page is displayed when no other content matches the requested document. If you are not using clean URLs, specify the part after "?q = ". If unsure, specify nothing.

Error reporting:_

| Write errors to the log and to the screen T |

Where Drupal, PHP and SQL errors are logged, On a production server it is recommended that errors are only written to the error log. On a test seruer it can be helpful to write logs to the screen.

Discard log entries older than:

11 week

The time log entries should be kept, Older entries will be automatically discarded. Requires crontab,

The final option shown in this screenshot lets you decide how long to keep logged messages. You will probably have to find your way as you go when it comes to making this choice, as it really depends on how busy you are, and how busy the site is. When in doubt, leave it as the default as this is a broadly sensible option.

You will need to use the crontab in order to enforce this setting, and in case mentioning cron jobs at this point has made things as clear as mud, it is important to understand the following:

Cron jobs (on Windows, these are known as scheduled tasks) are simply batches of commands that are run at specific times depending on how often you set them to run. The crontab allows you to stipulate various jobs, and the intervals at which they are to be executed.

As soon as you need to work with the cron. php script, which controls all the cron-related tasks on your Drupal site, flip over to the Cron and Scheduled Tasks section in Chapter 10.

Once you are happy that you have set your cron jobs appropriately, you can be sure that your automated tasks will be handled by the cron script. That aside, let's take a look and see the new settings from this section in action. For example, I attempted to access a page that did not exist. As expected, the following friendly message appeared:

■¿jj Cannot find server - Microsoft Internet Explorer

File Edit View Favorites Tools Help o o ® m a ip*»*

Favorites eis-a


^ Contechst Wildlife Community edit primary links

David Mercer

13 my blag

* create content

H my account

K administer

1:1 log out

Submitted by David Mercer on Wed, 2006-01-04 10:36, but the page you have requested has not been found. This error message has been logged and we will look into the problem, However, if you particularly want to vent, then please email the staff. » add new comment

So tell your children fairy tales, as the tears fall on the page, when we killed what made us human, to embrace an empty age.

d i rmailto:[email protected])contechst.com


An important point to note is that you should remember to check your logs on a regular basis as part of your overall strategy to ensure that the site continues to run smoothly. Error messages, warnings, and so on, are effectively a window into the operations of the site, and are an indispensable tool.

In order to take a look at your logs, simply click logs under the administer menu item, and you will be presented with a list of all the events that have taken place on your site. You can filter these events by selecting an option in the drop-down list under the heading Filter by message type, and then clicking Filter. If you want to look at the details of any error report, simply click the link found under the Message column, and the details of the log report will be displayed, much like this:

Basics I: Site Configuration

Home » administer » logs details


page not found


Wednesday, January 4, 2006 - 11:07


David Mercer





node/5 not found.




That wraps it up for error handling for now. Of course, it is important to realize that this type of error handling does not deal with errors or bugs that may be within the actual source code or file system of your website. In other words, this type of error handling is not to be confused with bugs within the application, it is simply there to deal with the functioning of the site as it pertains to serving pages. If you come across a bug in your system then you will need to attempt to repair the problem, failing which you can look to the Drupal community for help.

Make Money Writing

Make Money Writing

This Report Will Show You How To Make Money By Providing Writing Services To Other Internet Marketers. Learn how to make money by writing the right way. Grab your copy of this report now and learn. Why writing is a great way to earn money. How to compete with cheap writers, even if you charge a lot more money.

Get My Free Ebook

Post a comment