Drupal

How to run Drupal cron maintenance tasks under Mosso hosting

Update: Mosso was rebranded as The Rackspace Cloud in June 2009.

Update 1 Jan 2010: It looks like Rackspace has fixed the problem with Mosso's Scheduled Tasks. Anonymous' comment tipped me off that you can now set the command language to http, then enter your site's cron.php as the command to run.

Drupal 'Access Denied' errors for anonymous user

Drupal can be a pain. After a whole day of development, we started getting 'Access Denied' errors on all content that should be accessible by the anonymous user. The cause turned out to be something to do with a module incorrectly altering the node_access table.

Running this query fixed it:

Scaling Drupal for a heavy load site

We've recently been asked by a client to look into creating a Drupal installation that can cope with heavy load. Here's some useful instructions from johnandcailin.com.

I'll post a follow-up in the near future explaining what we ended up doing and how successful it was.

Displaying categories in a Drupal block

PHP code to display up to 30 categores.

<?php
if (user_access('access content')) 
{
	$result = db_query("SELECT d.tid, d.name, \ 
			COUNT(*) AS count FROM \
			{term_data} d INNER JOIN {term_node} \
			USING (tid) INNER JOIN {node} n USING (nid) \
			WHERE n.status = 1 GROUP BY d.tid, d.name \
			ORDER BY count DESC, d.name LIMIT 30");
	$items = array();
	while ($category = db_fetch_object($result))
	{
		$items[] = l($category->name .' ('. $category->count .')',
				'taxonomy/term/'. $category->tid);
	}
	return theme('item_list', $items);
}
?>

Web CMS platform comparison

Zope/Plone combination

  • Mature platform
  • Geared to more heavy-duty sites
  • Zope is an application server with a huge framework
  • Takes longer to understand
Syndicate content