Solution to Invalid command 'PubcookieAppID'

When setting up Pubcookie, you may encounter an "Internal Server Error" in your browser and the following error in /var/log/httpd/ssl_error_log (or wherever you're keeping your SSL error log):

[alert] [client] /var/www/html/foo/bar/baz/.htaccess: Invalid command 'PubcookieAppID', perhaps misspelled or defined by a module not included in the server configuration

This might be a headscratcher for a while, since you've probably been working hard to make sure that your Pubcookie configuration is nice and tidy and your .htaccess file is set up with PubcookieAppID, like this:

AuthType NetID
PubcookieAppID fribble
require valid-user

In fact, Apache is telling you exactly what you need to know: it can't make sense of the PubcookieAppID directive because the module that interprets that directive is not loading and thus is "not included in the server configuration."

To solve this, make sure that a line like this is actually somewhere in your configuration, normally somewhere like /etc/httpd/conf.d/pubcookie.conf:

LoadModule pubcookie_module modules/mod_pubcookie.so

In my case, I had commented it out while getting SSL to work. Duh.

[ Submitted by John on Tue, 2011-08-30 14:50. | | ]

Compiling and Installing Pubcookie on 64-bit RHEL6

Before attempting compilation, make sure you have the following prerequisites installed (and Apache of course):

yum install gcc mod_ssl openssl-devel httpd-devel

Then you're ready:

curl -O http://www.pubcookie.org/downloads/pubcookie-3.3.4a.tar.gz
tar xzvf pubcookie-3.3.4a.tar.gz
cd pubcookie-3.3.4a
./configure
make top_builddir=/usr/lib64/httpd top_srcdir=/usr/lib64/httpd

Then with sudo or as root:

make top_builddir=/usr/lib64/httpd top_srcdir=/usr/lib64/httpd install

You'll need to tell Apache to load pubcookie. In /etc/httpd/conf/httpd.conf or /etc/httpd/conf.d/pubcookie.conf:

LoadModule pubcookie_module modules/mod_pubcookie.so

Reference: ...Red Hat felt the need to mess with the Apache2 build environment

[ Submitted by John on Thu, 2011-03-03 11:06. | | ]

Pubcookie for Drupal 4.7

I've just committed a version of the pubcookie module that's compatible with Drupal 4.7. I also added a bit to the README to explain how the pubcookie module works:

When you click on the Log In link provided by the pubcookie block, it takes you to the directory you specified for "Login directory" under admin > settings > pubcookie (by default, 'login'). The pubcookie module takes this path, adds "pc" (an arbitrary string) to the end of it and -- and here's the key -- registers it as a menu item in the menu hook. So now http://yourdomain.com/login/pc is not a nonexistent file but a registered Drupal path that is "located" inside a directory that's protected by a .htaccess file restricting the contents to pubcookie-server-authenticated users. So when you reach that path, the pubcookie module receives a call to pubcookie_page() and goes from there.

[ Submitted by John on Tue, 2006-05-09 16:22. | | ]

Pubcookie, LDAP and Drupal

Checked in the new version of the pubcookie module, which now has configurable support for LDAP. I also added LDAP-to-profile mapping. When a new user logs in with pubcookie, the LDAP query can populate the user's profile if you've made profile field names match your directory server's field names. That's the Way it Should Be. Single-sign on with zero manual data entry.

All right, I'll be honest...it's not really the Way it Should Be, because Mary is going to get married and change her name, and her Drupal site profile is not going to update automatically. But at least she can edit her profile. (Chances are her LDAP entry isn't updated yet, anyway.)

[ Submitted by John on Fri, 2006-01-06 23:37. | | ]

Pubcookie module

Finished the pubcookie module for Drupal today. (Hmm, project module's url aliasing for projects seems to be broken on drupal.org. I'd expect it to be at drupal.org/project/pubcookie.) I began adding support for LDAP population of new users, but decided to check it in before feature creep set in too much.

I learn something new from sepeck almost every day. Click the track tab on that page to see how prolific he is. Today I learned the proper place for module documentation.

[ Submitted by John on Wed, 2005-12-28 20:32. | | ]

Pubcoookie

Spent a good part of the day writing a module to enable pubcookie-based authentication in Drupal. Unfortunately pubcookie works a little differently than Drupal's built-in distributed authentication expects, as the username and password are not entered into Drupal's login form but on a separate, secure server.

user.module is a little hairy. I should clarify; I spent little time writing the module (that's easy) and more time tracing paths of execution for authentication.

[ Submitted by John on Tue, 2005-12-27 22:43. | | ]