Programmatic CCK content type creation

Do you want your Drupal module to create a new content type using the power and flexibility of CCK, perhaps including the built in integration with Views? Here's one way, using Drupal 6.

Step 1: Design your CCK content type using the Drupal content type editor

The menu path is: Administer -> Content management -> Content types -> Add content type, URL http://example.com/admin/content/types/add. For more information about getting started with building a content type with CCK, visit this Drupal handbook page.

Leopard PHP with MySQL PDO

Warning! This is a hack.

Mac OS X 10.5 Leopard ships with a pretty good version of PHP5 and an excellent version of Apache2. (It also ships with Ruby, Python and Perl.) Sounds like a decent FOSS development platform, doesn't it?

If only.

It's close, but not quite there, for my purposes and those of most developers I know. Why? No database.

Easily solved, you might say. Indeed, dropping a pre-packaged MySQL install into Leopard is easy and clean. But...

And you knew there had to be a catch, right? Else, why would I be writing this?

Drupal - Moodle Integration

I'm the current owner of a pair of Drupal modules which help integrate the Drupal content management framework with the Moodle learning management system. Drupal and Moodle are among the best open-source packages in their respective spaces, and are likewise both very popular.

xdebug on MacBook Pro

I've successfully added several PHP extensions to my stock, Apple-supplied PHP install on my MacBook Pro. Tonight I wanted to add xdebug to help track down some Drupal OpenID problems. A bit of Google searching and I found a number of examples. Virtually all of them pointed at ActiveState's precompiled xdebug.so binaries, so I tried that.

Command-line (php -m) and (php -i) worked fine after getting my php.ini file correct. But my Apache module never saw the xdebug extension, and that's where I needed it most.

Making 1and1 More Secure

I run a couple of Drupal sites on 1and1 for historical reasons (3 years free). A while ago, I dutifully upgraded them to Drupal 5.7. And was surprised to find that PHP's register_globals was enabled.

All this time, I've been running with a .htaccess file which explicitly disabled that setting -- if 1and1's Apache was running mod_php only, it turns out. Apparently, such PHP settings in .htaccess files don't do anything if running PHP in CGI mode.

Syndicate content