Harry Slaughter's blog

All Important User Zero

tags:

A while back, I came across a "duplicate entry" problem that resulted from a missing row in the drupal table 'users'.

It turns out that the users table is not the only one that requires information on "user 0" (aka "anonymous").

This week I came across another problem in which anonymous users get a "you are not authorized ..." message when trying to view any sort of content.

Will Web2.0 ever mean anything?

tags:

Ok, ok, maybe there actually is something to this Web2.0 business. A lot of the Web2.0 hype stems from the maturation of blogging, the software that helps people blog and RSS. All of these are good and bad things. Good in that there's more information available to more people today than ever before. Bad because there's more information available to more people today than ever before.

CCK discussion

tags:

I think a lot of people, particularly developers, have misconceptions about the CCK module. I too misunderstood its real purpose and functionality when I first came across it. It's most definitely not a substitute for custom modules that create node types. It fills a current shortcoming of Drupal, which is the ability to add properties to nodes. I'm confident that Drupal will eventually abstract its node model to allow for more flexibility and more advanced features like node grouping and relationships. Meanwhile, CCK is doing a decent job at filling in some of the missing pieces.

Sharing Cookies between Sub-domains

tags:
If you have two sites using the same domain and would like to share cookies between them, set something like this in your settings.php file for each domain:

ini_set('session.cookie_domain', '.EXAMPLE.com');

Be sure you include the leading '.' before the domain name or it won't work.

This allows users to maintain login status between any sites configured for domain-wide cookies.

This can also have negative side effects, so don't do this unless you're familiar with all the cookies involved for the sites you wa

user sequence gotcha

tags:
Wasted a lot of time due to this doozy in the drupal code (user.module): <?php ... $array['uid'] = db_next_id('{users}_uid'); ... ?>

So let's say you want to share a users DB between two drupal sites, A and B.

For site A, you configure your settings.php normally. This will be your master DB.

In site B, you point user related tables to site A's database:

Syndicate content